Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Whenever I install a package for python it only installs for Python2.6 which came with the Debian 6. I am wondering how do I install for python2.7 with apt-get. Presently I am downloading the tarballs and installing manually

share|improve this question
You could try making a symlink from /usr/lib/python2.6/ to /usr/lib/python2.7 – mreithub Feb 8 '13 at 21:33
See my answer to "Python 2.7 on Ubuntu". – Faheem Mitha Feb 9 '13 at 15:51
up vote 1 down vote accepted

You probably can't because nobody has made such a package compatible with Debian 6.1 yet. Your approach seems reasonable and is what most people do in this situation.

share|improve this answer

Debian 7 (wheezy) is almost ready for release, and has a python2.7 package:


If you need to stay with Debian 6, you could try building wheezy's python2.7 package from source. Fetch the three source files from the above URL (.dsc, .diff.gz, and .tar.gz.orig) and follow Debian's "How do I build binary packages from a source package?"

share|improve this answer

The Ubuntu pythoneers have a backport PPA at https://launchpad.net/~pythoneers/+archive/lts - other Google hits for "debian python2.7 backport" look less promising. I haven't tried it; if you do, please follow up with a comment.

share|improve this answer
I wrote about this in detail at stackoverflow.com/a/8931660/350713 – Faheem Mitha Feb 9 '13 at 15:50

Your Answer


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.