1, python2.7 and Pip in 192.168.0.65
#ssh 192.168.0.65
#cd/usr/local
#wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
# tar ZXVF python-2.7.10.tgz
# CD Python-2.7.10
# mkdir/usr/local/python2.7
#./configure--prefix=/usr/local/python2.7
#make && make Install
#which python
# Mv/usr/bin/python/usr/bin/python_old
# ln-s/usr/local/python2.7/bin/python2.7/usr/bin/python
Reference Documents http://www.cnblogs.com/lanxuezaipiao/archive/2012/10/21/2732864.html
You need to install Zlib,setuptools before installing PIP
#yum-y install zlib error, as follows:
No module named Yum
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang /zh-cn/images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>
The reason for this error is that I upgraded Python, which makes Yum unusable.
Reference Documentation: http://blog.csdn.net/ei__nino/article/details/8495295
Workaround:
# Vi/usr/bin/yum
#!/usr/bin/python_old
//The first line of the file changed to #!/usr/bin/python_old because I renamed the old Python python_old. and Yum matches the old Python.
#/sbin/service yum-updatesd Restart
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>
# yum-y Install zlib zlib-devel //Installation Successful! But installation Setuptools still error. Need to recompile python.
Reference Documents http://www.idjango.com/content/0/
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>
Recompile python below
# cd/usr/local/python-2.7.10
#./configure--prefix=/usr/local/python2.7
#make && make Install
#cd/usr/local
# Curl-o Https://pypi.python.org/packages/source/s/setuptools/setuptools-2.0.tar.gz
# tar ZXVF setuptools-2.0.tar.gz
# CD setuptools-2.0
#python setup.py Build
#python setup.py Install//Success
PIP official website Https://pypi.python.org/pypi/pip
#cd/usr/local
# Curl-o https://pypi.python.org/packages/source/p/pip/pip-7.1.2.tar.gz#md5=3823d2343d9f3aaab21cf9c917
# Curl-o https://pypi.python.org/packages/source/p/pip/pip-7.1.2.tar.gz
Use wget download will error, here instead of Curl-o can, these 2 commands download the package is right
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang /zh-cn/images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>
# tar ZXVF pip-7.1.2.tar.gz
# CD pip-7.1.2
#python setup.py Install
# ln-s/usr/local/python2.7/bin/pip/usr/bin/pip
The //pip is installed by default under/usr/local/python2.7/bin/
#pip // test PIP
Error: Importerror:cannot Import name Httpshandler
The reason is that openssl,openssl-devel two packages are not installed correctly
Workaround:
#Yum install OpenSSL openssl-devel-y
Continue to error, then I recompile Python and Pip. OK no longer has an error.
Linux upgrade python2.7, installing Pip,setuptools,zlib