We expose a Canonical way to Manage Multiple Versions of a program or Multiple Similar programs on Linux.
The package update-alternatives should be present by Default in your System but if you want to check:
Documentation about update-alternatives -> http://williamdemeo.github.io/linux/update-alternatives.html.
To Manage you Python Versions in Linux you need to let Know to update-alternative the List of elements of this Group and their level of Preference.
Here for Example we suppose you have installed python2.4, python2.6 and python2.7.
First, open a Terminal window and Switch to SuperUser with:
Now to Set update-alternatives on this Python Group you perform:
update-alternatives --install /usr/bin/python python /usr/bin/python2.4 10
update-alternatives --install /usr/bin/python python /usr/bin/python2.6 20
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 30
Next after update-alternatives is Configured to Change the Python Version:
update-alternatives --config python