Install python 3 in Ubuntu 12.04

Ubuntu 12.04 ships with python 2.7, whereas 12.10 comes with python 3 by default.

Check installed version:
python -V

Install python 3 from python development ppa:
sudo add-apt-repository ppa:python-dev/ppa
sudo apt-get update
sudo apt-get install python3.3

Check all available python versions:
ls -l /usr/bin/python*

Remove the symlink to 2.7:
sudo rm -i /usr/bin/python

Create a symlink to python 3:
sudo ln -s /usr/bin/python3.3 /usr/bin/python
python -V

Revert the symlink if you ever need to go back to older version of python.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s