Install Python 2.6, 2.5, 3.3 in Ubuntu 12.04, 12.10, 13.04 via PPA

This tutorial shows how to install older & newer versions of python in Ubuntu. Felix Krull has created a PPA that contains multiple python versions:

  • python 2.4.6 for Ubuntu 10.04, Ubuntu 12.04, Ubuntu 12.10, Ubuntu 13.04, Ubuntu 11.10, Ubuntu 11.04
  • python 2.5.6 for Ubuntu 10.04, Ubuntu 12.04, Ubuntu 12.10, Ubuntu 13.04, Ubuntu 11.10, Ubuntu 11.04
  • python 2.6.8 for Ubuntu 13.04, Ubuntu 12.04, Ubuntu 12.10
  • python 2.7 for Ubuntu 10.04, Ubuntu 10.10
  • python 3.1 for Ubuntu 13.04, Ubuntu 12.10, Ubuntu 12.04, Ubuntu 11.10
  • python 3.2 for Ubuntu 13.04, Ubuntu 10.04
  • python 3.3 for Ubuntu 12.04, Ubuntu 11.10, Ubuntu 10.04

To add the ppa, run below command in terminal:

sudo add-apt-repository ppa:fkrull/deadsnakes

Then update package lists:

sudo apt-get update

To install python 2.4 in Ubuntu 12.04, etc. run below command:

sudo apt-get install python2.4

To install python 2.5 in Ubuntu 12.04, etc. run:

sudo apt-get install python2.5

To install python 2.6 in Ubuntu 12.10, Ubuntu 12.04, run:

sudo apt-get install python2.6

To install python 2.7 in Ubuntu 10.04, Ubuntu 10.10

sudo apt-get install python2.7

To install Python 3.2 in Ubuntu 12.04:

sudo apt-get install python3.2

To install Python 3.3 in Ubuntu 12.04:

sudo apt-get install python3.3

By Ji m

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to remind me outdated tutorial! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via Buy me a coffee:


  1. sudo add-apt-repository ppa:fkrull/deadsnakes on Ubuntu server 12.04 gives “command not found” error.
    You have to run two more command before to install this utilty:
    sudo apt-get install python-software-properties
    sudo apt-get install software-properties-common

  2. Finally it works (sudo apt-get install) turned through the first 2 lines, thanks a lot

  3. After this, you need to ‘unlink /usr/bin/python’ and then ‘ln -s /usr/bin/python” …or at least that’s what I figured out. I’m a big of a linux noob, just posting this in case other noobs don’t get this.

    1. Andrew i did unlink /usr/bin/python and
      then ln -s /usr/bin/python as you recommended but I guess this is not the complete script as my system can no longer find the path to python!!!!

Comments are closed.

Exit mobile version