How to make another version of Python the default in Linux

Опубликовано: 08 Октябрь 2024
на канале: Exchange Times .Net
14,981
138

In this video 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 was Python 2 and needed to change it to 3.7.

1. Open your .bashrc file in your home directory using a text editor or shell.

2. Add alias python='/usr/bin/pythonx.x' to the file and save it.
(x.x is your version that you want default)

3. Logout or reboot. Open Terminal and then type Python. It should
show you the version you specified in the .bashrc file