

The file acts as a shell script that is run each time that specific user opens a terminal (or logs in over SSH, Serial, etc.). bashrc is a file that resides in the user's home directory (the user pi in this case). We want to this so that Python 3 is used every time we log in.

If you see that your OS is using Python 2 by default, you'll need to change it to use the Python 3 installation. For example, you might see Python 2.7.13. You should see which version is being used by default. In a terminal window, enter the following command: language:bash

We just have to make 1 minor change so that the Pi uses Python 3 whenever we type python into a terminal. However, versions 2 and 3 come installed by default. Use Python 3īy default, Raspbian (Stretch version April 2018 and earlier) uses Python 2. If you are using a Serial or SSH terminal, log back in using the username pi and the password you created earlier. If asked to reboot, select Yes and press enter.
