How to set Python back to the original version
Solution 1:
The system's default version is the one pointed to by the symlink /usr/bin/python
. In 16.04 this should be python2.7
but you have changed it (as you discovered, this is a bad idea as many programs in Ubuntu use Python and will not work if they find the wrong version), and it is pointing to /usr/bin/python3
which is a symlink pointing to /usr/bin/python3.5
Remove the symlink you changed (you can't just overwrite it in one step):
sudo rm /usr/bin/python
and make a new symlink with the same name to the correct Python version (that it originally pointed to). In your case this is python2.7
so:
sudo ln -s /usr/bin/python2.7 /usr/bin/python
now python --version
will give you Python 2.7.12
(or 2.7.[some number] depending on what minor version is installed)