Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

Ubuntu 10.04 has only two supported Python versions 2.6 and 3.1. Developers often need more, to test that their Python code works on 2.7, 2.5 (and maybe even 2.4 and older ones). What's the best way to install those Python versions side-by-side on a lucid system?

Is it Felix Krull's PPA, which I'm currently using?

Incidentally, some important packages aren't available in those non-standard Pythons from the deadsnakes PPA:

  • python-setuptools (but you can install python-setuptools-deadsnakes)
  • python-profiler
share|improve this question
Python has a limited list of dependencies, so building from source is easy. – codeape Sep 30 '10 at 23:49
I have a policy of avoiding building things from sources. Adding a PPA and installing a package is nicer, especially if you have to do that on multiple machines. – Marius Gedminas Oct 3 '10 at 21:01
This really seems like the best way. Mark yourself as the best responder! – jathanism Oct 6 '10 at 22:58
up vote 14 down vote accepted

I also use the fkrull's Deadsnakes PPA. I think it is the best way to get Python 2.4, 2.5, and 2.7 at this time. I have not run into any problems using it alongside the default Python2.6. It also helps to keep things clean if you use a virtualenv, especially for those versions of Python that are not the system default.

share|improve this answer
+1 for virtualenv – Marius Gedminas Oct 3 '10 at 20:57
+1 for PPA + virtualenv. I've expanded upon this approach in a similar question:… – Alan Plum Feb 12 '11 at 17:56

Your best bet would probably be using debootstrap to create a chroot of an earlier Ubuntu version where 2.5 was supported, or use a virtual machine.

Installing it in Ubuntu alongside 2.6 may cause problems.

share|improve this answer
Could you be more specific about the problems that may cause? – Marius Gedminas Oct 3 '10 at 20:57
Some libraries are incorrectly marked as supporting 'all' Python versions when they only support 2.6.x. They will break in interesting and hard-to-debug ways. – lfaraone Oct 9 '10 at 14:21

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.