Apr 27 2019

How to make another version of Python the default version in Linux

In this post I show you how to make Python 3.7 the default version of Python on Linux. (This should work on all distributions of Linux).

My default version of Python was Python 2 and I needed to change it to version 3.7. 1.


  1. Open your .bashrc file in your home directory using a text editor or the shell.
  2. Add alias python=’/usr/bin/pythonx.x’ to the file and save it. (x.x is your version that you want to be the default)
  3. Logout of your session or reboot your computer, then log back in.
  4. Open the terminal and then type in Python. It should now show you the version that you specified in the .bashrc file