in order to use some automated operations tools and project needs, it is necessary to learn the language of Pythoninstall Python 2.7.9 on Linux CentOS 6.6---turn from Dudu
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-develyum install Bzip2-develyum install Openssl-develyum install Ncurses-develyum install Sqlite-devel
3) Download and unzip the source code of the Python 2.7.9
Cd/optwget--no-check-certificate Https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xztar XF PYTHON-2.7.9.TAR.XZCD Python-2.7.9
4) Compiling and installing Python 2.7.9
./configure--prefix=/usr/localmake && 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
shsh-4.1# Python-vpython 2.7.9
Python Learning notes-lap environment