7

I am using Ubuntu 10.10 which comes by default installed with Python 2.6, however some applications that I want to use require 2.7 and I want to update.

How would I go about doing this?

Alex
  • 71

3 Answers3

5

It is already in the official repositories: http://packages.ubuntu.com/maverick/python2.7

sudo apt-get install python2.7

You then execute python2.7

P.S. Support for ubuntu 10.10 ends in April 2012: https://wiki.ubuntu.com/Releases

3

The Deadsnakes PPA is helpful for old and new versions of Python.

Lucid through Precise is supported with versions 2.x and 3.x available. Since you are looking for 10.10, the direct link is:

https://launchpad.net/~fkrull/+archive/deadsnakes?field.series_filter=maverick

Octavian Helm
  • 14,515
Teg
  • 131
1
  1. Update Ubuntu 10.10 sources (credit).

    Because 10.10 is no longer supported.

    sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
    sudo apt-get update
    
  2. Install add-apt-repository command (credit):

    This stops you from getting the sudo: add-apt-repository: command not found error in the next step.

    sudo apt-get install python-software-properties
    
  3. Install Deadsnakes PPA (credit):

    sudo add-apt-repository ppa:fkrull/deadsnakes
    sudo apt-get update
    
  4. Install Python 2.7:

    sudo apt-get install python2.7
    
  5. Profit!

    $ python2.7 --version
    Python 2.7.4
    


Edit: You can also install python 3.3 this way. Just replace step 4 with:
sudo apt-get install python3.3

Same goes for python 2.4, 2.5, 3.1, 3.2, etc.

meshy
  • 124