Multiple Python Version on the same computer

In the place that I work we have some legacy servers with really old packages installed. I did a Python script using version 2.7.5 and when I finished my development I figured out that the server was using version 2.4 (what was launch in 2004!). So… To test it before move to production, I needed install this old version. To do that I just:

To install it (per the instructions in the link above), you do the following:

steve@ubuntu64 ~ $ sudo add-apt-repository ppa:fkrull/deadsnakes

Then you need to update your cache:

steve@ubuntu64 ~ $ sudo apt-get update

Finally, simply install the other versions (I'm running on ubuntu 12.04 LTS, so I have python 2.7 already):

steve@ubuntu64 ~ $ sudo apt-get install python2.4 python2.5 python2.6

(Check details on:

After install it I removed the repository:

sudo add-apt-repository ppa:fkrull/deadsnakes --remove

To execute the old version just type:

Leave a Reply

Your email address will not be published. Required fields are marked *