Install a local version of Python 3

wget https://www.python.org/ftp/python/3.4.0/Python-3.4.0.tar.xz
tar Jxf Python-3.4.0.tar.xz
cd Python-3.4.0/
./configure --prefix=$HOME/python
make
make install

Installing local version of modules
Get the module source code from the index: https://pypi.python.org/pypi
Install ncurses:

sudo apt-get install libncurses5-dev

Now install setuptools:

wget https://pypi.python.org/packages/source/s/setuptools/setuptools-3.5.tar.gz
tar xf setuptools-3.5.tar.gz 
cd setuptools-3.5/
py setup.py install

Where py is an alias:
alias py=’/home/joel/python/bin/python3.4′

setuptools is an essential requisite for installing readline
Now install readline:

wget https://pypi.python.org/packages/source/r/readline/readline-6.2.4.1.tar.gz
tar xf readline-6.2.4.1.tar.gz
cd readline-6.2.4.1/
py setup.py install

Now edit the file ~/.pythonstartup

# python startup file 
import readline 
import rlcompleter 
import atexit 
import os 
# tab completion 
readline.parse_and_bind('tab: complete') 
# history file 
histfile = os.path.join(os.environ['HOME'], '.pythonhistory') 
try: 
    readline.read_history_file(histfile) 
except IOError: 
    pass 
atexit.register(readline.write_history_file, histfile) 
del os, histfile, readline, rlcompleter

Now add the following to .bashrc:

PYTHONSTARTUP="/home/joel/.pythonstartup"

To allow using history in my local python version, I needed to do the above steps (installing python followed by modules setuptools and readline)