Here is what I did to install Python 3.3 on Ubuntu 12.04:
-
Install dependencies:
sudo apt-get build-dep python3.2 sudo apt-get install libreadline-dev libncurses5-dev libssl1.0.0 tk8.5-dev zlib1g-dev liblzma-dev
-
Download Python 3.3.0:
wget http://python.org/ftp/python/3.3.0/Python-3.3.0.tgz
-
Extract:
tar xvfz Python-3.3.0.tgz
-
Configure and Install:
cd Python-3.3.0 ./configure --prefix=/opt/python3.3 make sudo make install
-
Test if it worked:
/opt/python3.3/bin/python3
You should see something similar:
Python 3.3.0 (default, Jan 31 2013, 18:37:42)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
Some Additional things that are useful... you can create a virtual environment in your home and just activate Python 3.3 on demand..
-
Create a Virtual Environment in your home:
/opt/python3.3/bin/pyvenv ~/py33
-
Activate the virtualenv:
source ~/py33/bin/activate
-
Install distribute tools:
wget http://python-distribute.org/distribute_setup.py python distribute_setup.py
-
Install pip:
easy_install pip
-
Install any python packages you want (i.e. bottle)
pip install bottle
Enjoy!