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.
Steps:
- Open your .bashrc file in your home directory using a text editor or the shell.
- 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)
- Logout of your session or reboot your computer, then log back in.
- Open the terminal and then type in Python. It should now show you the version that you specified in the .bashrc file
One Comment
Pingback: