Installing the dependencies:

sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev

Download and compile python:

wget https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tar.xz
tar -xf ./Python-3.4.1.tar.xz
cd ./Python-3.4.1
./configure --prefix=/opt/python3.4.1
make && sudo make install

Some nice touches to install a py command by creating a symlink:

mkdir ~/bin
ln -s /opt/python3.4.1/bin/python ~/bin/py