Evidently Ubuntu 10 is already very old and I do not have one available to test, but you should be able to install Python 2.7 side by side with the standard Python system. The important thing is not to try to replace standard Python with 2.7 as the various parts of the system will no longer work.
Try this:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DB82666C
sudo apt-get update
sudo apt-get install python2.7 python2.7-dev
Check that Python 2.7 has been installed and is in PATH:
python2.7 --version
If this prints version 2.7.x, then it worked. Also check that the default version of the system continues to previous:
python --version
You can now install easy_install-2.7 and Pip-2.7:
curl http://python-distribute.org/distribute_setup.py | sudo python2.7 -
easy_install-2.7 pip
maybe start by updating Ubuntu :)
– JJoao