Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

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
1  
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.