First download the python2.7.3 version to the official website, compile and install
Copy CodeThe code is as follows:
$wget http://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
$make && make Install
Then back up the original Python and make the python2.7 soft connect to the new location
Copy CodeThe code is as follows:
$MV/usr/bin/python/usr/bin/python.bak
$LN-S/usr/local/bin/python2.7/usr/bin/python
$python-V
Version hint for 2.7.3
Change Yum to make it work
Copy CodeThe code is as follows:
$vim Vim/usr/bin/yum
Change the #/usr/bin/python to #/usr/bin/python2.4 so yum can run normally.
Installing Easy_install
Copy the Code code as follows:
$yum Install Python-setuptools
Then install Python-setuptools to pypi Web site download Python-setuptools, version to be the same version as Yum, or run the time will appear:
Copy CodeThe code is as follows:
$ easy_install RSA
Traceback (most recent):
File "/usr/bin/easy_install", line 5, in
from pkg_resources import load_entry_point
Importerror:no module named Pkg_resources
Then:
Copy the code code as follows:
$wget http://pypi.python.org/packages/source/s/setuptools/ setuptools-0.6c5.tar.gz
$tar zxvf setuptools-0.6c5.tar.gz
$cd setuptools-0.6c5
$python setup.py Install
installed successfully this makes it easy to use Easy_install to install the Python library