I am trying to get a python code to run on boot on the raspberry pi. I added the following line to the .bashrc file at the end of the file:
sudo python3 /home/pi/code.py
The pi uses python2 to run the code instead of python3. Why is this happening and how can I make it run python3?
Thanks