Linux Tutorial
How to change the python versions temporarily in the linux environment?
If multiple python versions are installed and available on linux environment ( RHEL8 / Fedora | Centos), Lets see here how to change the python version needed temporarily.
$ sudo update-alternatives --config python
Once run above command, displays the available python versions and prompting the required selection.
There are 2 programs which provide 'python'. Selection Command ----------------------------------------------- *+ 1 /usr/libexec/no-python 2 /usr/bin/python3 Enter to keep the current selection[+], or type selection number: 2
Once provided the required python selection, the required version is activated for python command.
Lets check the currently active python version,
$ python -V
Output:
Python 3.6.8
Linux Tutorial
Privacy Policy | Copyright2020 - All Rights Reserved. | Contact us | Report website issues in Github | Facebook page | Google+ page