Install Python 2.7.6 on CentOS/RHEL 7/6
1.Install gcc
# yum install gcc openssl-devel bzip2-devel
Download python 2.7 using the following command in terminal.
# wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
Extract downloaded archive using tar command.
# tar xvf Python-2.7.6.tar.xz
Install Python 2.7.6
Now run the following commands to compile Python 2.7.6 and install on your system using altinstall.
# cd Python-2.7.6
# ./configure –enable-optimizations
# make altinstall
Now check python Version using follwoing command.
# /usr/local/bin/python2.7 -V
Install pip utility using with following command.
# curl “https://bootstrap.pypa.io/get-pip.py” -o “get-pip.py”
# python2.7 get-pip.py