cd /usr/local/src

wget http://www.python.org/ftp/python/3.1.1/Python-3.1.1.tar.bz2

tar -jxvf Python-3.1.1.tar.bz2

cd Python-3.1.1

./configure

make

make install

Now move /usr/bin/python /usr/bin/python.bk

then create symlink :

ln -s /usr/local/bin/python3 /usr/bin/python

check python -V