Ubuntu Notes Install Python 2 on Ubuntu 20.04 sudo apt install python2 python2 -V Easily switch from Python 2 to Python 3 or vice-versa on Ubuntu 20.04 Check the python versions available on your Ubuntu system. ls /usr/bin/python* Check if you already have some python alternatives configured. sudo update-alternatives --list python Set the desired Python alternatives. In this example, we are setting Python2 and Python3 alternatives. Execute the following commands: sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1 sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2 Confirm that the alternatives are ready to be used: sudo update-alternatives --list python Change to the desired alternative python version. sudo update-alternatives --config python Verify the new python version: python -V