PDA

View Full Version : [ubuntu] How do I upgrade to Python 2.7?



Uxeh
February 10th, 2012, 01:28 AM
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?

oldfred
February 10th, 2012, 01:57 AM
Welcome to the forums.

I am running Maverick. If you look in Synaptic with a search on python2.7 it shows all the files. You can do the same with python3.

Whatever you do, do not uninstall 2.6 as Ubuntu uses that for many internal things. You just have to specify in each program or command line when using python to say python2.7 not just python as that will run the default.

Uxeh
February 10th, 2012, 02:07 AM
Welcome to the forums.

I am running Maverick. If you look in Synaptic with a search on python2.7 it shows all the files. You can do the same with python3.

Whatever you do, do not uninstall 2.6 as Ubuntu uses that for many internal things. You just have to specify in each program or command line when using python to say python2.7 not just python as that will run the default.

Hi, and thanks. I installed python2.7 however when I use the command python it uses the 2.6 installation, which isn't what I want. I could use python2.7 however when I would install a python module, it would set it up for the 2.6 installation. How would I "replace" 2.7 over 2.6?

oldfred
February 10th, 2012, 04:37 PM
You cannot change the default without breaking the entire system.

If using command line
python2.7

If you are writing programs.

#!/usr/bin/env python2.7
#

You could install in another 10GB partition a newer version of Ubuntu that uses 2.7 as the default if you want.