|
Python 2.7 installation process detailed on CentOS 6.5.
1.yum groupinstall "Development tools"
2. Install the components needed to compile Python
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel
3. Download and extract the latest Python 2.7 source code
wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tar.xz
tar xf Python-2.7.10.tar.xz
4. Compile and install Python
cd Python-2.7.10
./configure -prefix = / usr / local
make && make install
make clean
make distclean
5. The system python commands to the Python 2.7
mv / usr / bin / python /usr/bin/python2.6.6
ln -s /usr/local/bin/python2.7 / usr / bin / python
6. python yum need to do is specify 2.6.6
vi / usr / bin / yum
The file header
#! / Usr / bin / python
Changed
#! / Usr / bin / python2.6.6 |
|
|
|