0

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?

TheLoneKing
  • 1,417
  • 4
  • 19
  • 29
  • Try checking out the answers to this question for some insight here: http://askubuntu.com/questions/14615/how-do-i-make-the-terminal-run-python-3-1 – Aaron Jul 19 '13 at 14:40

1 Answers1

4

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
chronitis
  • 12,367
  • 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