Install Python 2.7.9 on Linux CentOS 6.6 This article applies to Centos6.5
CentOS 6.6 comes with Python 2.6.6, while compiling LLVM requires more than Python 2.7.
Checking for Python .../usr/bin/pythonchecking for Python >= 2.7 ... Not foundconfigure:error:found python 2.6.6 (/usr/bin/python); Required >= 2.7
The newest in Yum is also Python 2.6.6, which can only download Python 2.7.9 source code to compile and install itself.
The procedure is as follows:
1) Install Devtoolset
Yum Groupinstall "Development tools"
2) Install the packages needed to compile Python
Yum install zlib-devel yum install bzip2-devel yum install openssl-devel yum install ncurses-devel yum Install SQL Ite-devel
3) Download and unzip the source code of the Python 2.7.9
cd/opt wget--no-check-certificate https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz Tar XF python-2.7.9.t AR.XZ CD Python-2.7.9
4) Compiling and installing Python 2.7.9
./configure--prefix=/usr/local make && make Altinstall
5) Point python command to Python 2.7.9
Ln-s/usr/local/bin/python2.7/usr/local/bin/python
6) Check Python version
SH sh-4.1# python-v python 2.7.9
CentOS6.5 Installing the Python environment