Take the 2-minute tour ×

I have Ubuntu 8.04.3 LTS and ran this:

$ sudo apt-get install python2.7

I got this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package python2.7

It can find python2.5, so I don't think I spelled the package name wrong. I wonder if it's because I'm on an older version of Ubuntu (2008). Is there a straightforward way to upgrade to Python 2.7 (or even 2.6) without upgrading my OS?

share|improve this question
You could probably backport it from more recent versions of Ubuntu. But if you want it used as default version, that could be problematic. –  Faheem Mitha Dec 6 at 16:53

1 Answer 1

up vote 2 down vote accepted

The best would be to upgrade to another LTS version of Ubuntu (8.04 to 10.04 is a supported upgrade path; from there you can go to 12.04). As noted in a comment, there is a Python 2.7 PPA for Ubuntu 10.04, and Ubuntu 12.04 has 2.7 too.

But you can compile Python 2.7 from source and install it in, e.g., /opt/python2.7.

Grab the source code from http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2, decompress it and then ./configure --prefix=/opt/python2.7. Then to use that Python, use /opt/python2.7/bin/python2.7 (might be wrong on the filename here).

share|improve this answer
Even 10.04 doesn't have Python 2.7, but there's a PPA with Python 2.7 for Ubuntu 10.04. –  Gilles Aug 30 '12 at 23:24

Your Answer


