Are you sure you want to install zlib before installation? If not, please install yum install zlib-devel.
Wgethttp: // www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
Tar zxvf Python-2.7.3.tgz
Cd Python-2.7.3
./Configure -- prefix =/usr & make install
(You can also choose not to overwrite the old version, define the installation path, and finally make a soft link)
After the installation is complete, you will find that CentOS yum requires the system's built-in version 2.4, which must be changed to yum. Otherwise, yum cannot be used.
Vi/usr/bin/yum
1st rows
#! /Usr/bin/python :#! /Usr/bin/python2.4
Install EasyInstall
Wgethttp: // pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-p2y2.7.egg
Sh setuptools-0.6c11-p2y2.7.egg
After installation, you can directly use the easy_install command to install a third-party Python Development Kit, for example, easy_install SQLObject.
All are automatically completed, so you do not need to find egg one by one.