1#Check available versions
2ls /usr/bin/python*
3#Change the used version 3.5 or 3.7 etc
4alias python='/usr/bin/python3.x'
5#do this other thing
6. ~/.bashrc
7#Check version
8python --version
1update-alternatives --list python
2# update-alternatives: error: no alternatives for python
3# means not set yet
4update-alternatives --install /usr/bin/python python /usr/bin/python3 1
5# update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in auto mode
6update-alternatives --install /usr/bin/python python /usr/bin/python3.8 2
7# update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python) in auto mode
8update-alternatives --install /usr/bin/python python /usr/bin/python3.9 3
9# update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in auto mode
10# Higher last param will be auto selected
11update-alternatives --list python
12# shows all
13python --version
14# Python 3.9 or whichever highest
15update-alternatives --config python
16# This will let you change vers from a menu