ls /usr/bin/python*
# Check if there is any alternatives configured
sudo alternatives --list | grep python

Now, configure two Python alternatives. From the step above, we could see that Python 2.7 and Python 3.8 present on the system.

Execute the commands below on the Terminal.

$ 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 and set the Python alternatives, enter selection

$ sudo update-alternatives --config python

Samuel Chong

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store