switch between different python versions - Massii94/GENERAL-TUTORIAL GitHub Wiki
1- Install your python version (python3.7 for example):
sudo apt-get install python3.7
2-Add Python3.6 & Python 3.7 to update-alternatives:
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2
3-Update Python 3 to point to Python 3.7:
sudo update-alternatives --config python3
Enter 2 for Python 3.7
4- Test the version of python:
python3 --version