Compile & Install Python 2.7
# wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
# tar xf Python-2.7.6.tar.xz
# cd Python-2.7.6
# ./configure –prefix=/opt
# make && make altinstall
————————————————————————————————————–
To Make default python 2.7 Environment
Edit /etc/bashrc and at the end of the file past below line.
# alias python=python2.7
————————————————————————————————————–
To update changes run below command in terminal.
# source /etc/bashrc
————————————————————————————————————–