Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My computer previously had Python 2.7. I recently installed Python 3.2. But when I run Python prompt from the Terminal, it still shows the version as 2.7.3.

dineshkumar@dineshkumar-desktop:~$ python
Python 2.7.3 (default, Apr 10 2013, 05:46:21)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

How do I change it to 3.2?

share|improve this question
    
Try checking out the answers to this question for some insight here: askubuntu.com/questions/14615/… –  BryceAtNetwork23 Jul 19 '13 at 14:40

1 Answer 1

up vote 3 down vote accepted

Python 3.2 will be available as python3.2, or possibly python3 depending on which version of Ubuntu you are using.

Significant parts of Ubuntu are written in python and you cannot change which version the python link points to without breaking the system. You can install extra versions, but you'll have to use a longer name to start them, eg python3.3, python2.6).

See this answer for more details.

The default python versions are:

Lucid/11.10        2.6.5    3.1.2
Precise/12.04      2.7.3    3.2.3
Quantal/12.10      2.7.3    3.2.3
Raring/13.04       2.7.4    3.3.1
share|improve this answer
    
Or python3.3 on Ubuntu 13.04. python3 should link to whatever version of Python 3.x you have installed. –  Oli Jul 19 '13 at 14:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.