Of course Ubuntu 10 is already quite old and I do not have one available to test, but you should rather be able to install Python 2.7 side by side with the Python standard system. The important thing is not to try to replace the default Python with 2.7 because the various parts of the system will stop working.
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
Verify that Python 2.7 has been installed and is in the PATH:
python2.7 --version
If this printed version 2.7.x, then it worked. Also check that the default version of the system continues to the previous one:
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