Python 2.7.6 on Ubuntu 12.04 How to?

25,555

Solution 1

Ubuntu 12.04 ships with python 2.7.3. You should be able to download https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz and follow the README file. The steps should be simple enough.

./configure
make
make install

Note that you don't have to remove python-2.7.3 from your system to install an other version. You can switch between different versions using

sudo update-alternatives --config python

Also, did you check this out?

https://stackoverflow.com/questions/20445565/ubuntu-12-04-lts-update-python-2-7-3-to-2-7-6-without-breaking-dependencies

Solution 2

On Ubuntu 12.04 or >12.04 this will work perfectly. Run these simple commands in your terminal:

wget  https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz  
./configure
make
make install
Share:
25,555

Related videos on Youtube

Ph0en1x
Author by

Ph0en1x

Founder and architect in Centaurea (http://centaurea.io) - awesome software development and consulting company that specialises in construction of high-load, scalable, distributed and Big Data processing systems.

Updated on September 18, 2022

Comments

  • Ph0en1x
    Ph0en1x almost 2 years

    I'm developer and I need to make my enviroment work with Python 2.7.6 (not 2.7.3) on the Ubuntu 12.04. Please, provide me some notes how to do that?

    • Admin
      Admin almost 10 years
      Thanx, ! I upgraded form python 2.7.5+ to 2.7.6 on Ubuntu 13.10.I didn't have the need to use the command "sudo update-alternatives --config python", but I had to use "sudo make install" in order to get the permissions to install the update.
  • luator
    luator about 9 years
    Switching between 2.73 and 2.7.6 does not work for me ("error: no alternatives for python."). The new version seems to have overwritten the old one.
  • colidyre
    colidyre over 4 years
    This answer only shows (in addition to the accepted answer) how to download the file via wget from command line. It also misses tar xf(v)z command to unpack archive and a cd into the folder before doing ./configure and so on.
  • sourav
    sourav over 4 years
    yes that is what only missing in the new_sys_admin answer. This is a complete answer for everyone.