What's the best way to get Python 2.5 and 2.7

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

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

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.

Solution 2

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.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply