Monday, August 8, 2011

Install Python 3.2 on Ubuntu 11.04

Ubuntu comes with Python 2.7, but I want to try out Python 3.2.x. After some google searches, I cannot just remove Python 2.7 and install 3.2.x, as Ubuntu's other modules requires 2.7


But, you can have Python 3.2.x coexist with Python  2.7. This is how:





Launch Ubuntu Software Center, then search Python 3.2. Select Python 3.2 and install





After that, you can run Python 3.2 in terminal like this


newgear@ubuntu:~$ python3.2
Python 3.2 (r32:88445, Mar 25 2011, 19:28:28) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> import sys
>>> sys.version_info
sys.version_info(major=3, minor=2, micro=0, releaselevel='final', serial=0)




No comments:

Post a Comment