Install python2.7
wget https://www.Python.org/ftp/Python/2.7.8/Python-2.7.8.tgz
Tar xvf python-2.7.8.tgz
CD Python-2.7.8
./configure–prefix=/usr/local/python27
Make
Make install
Mv/usr/bin/python/usr/bin/python_old
Ln-s/usr/local/python27/bin/python/usr/bin/
Python # View version
Troubleshoot problems that Yum cannot use
Vim/usr/bin/yum
First line #!/usr/bin/python Replace with old version Python #!/usr/bin/python2.4 note may be 2.6
PIP Module Installation
Yum Install Python-pip # CentOS mount Pip
sudo apt-get install Python-pip # Ubuntu installation pip
PIP Official Installation Script
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
Python get-pip.py
PIP compilation Installation
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
Tar zxvf setuptools-0.6c11.tar.gz
CD SETUPTOOLS-0.6C11
Python setup.py Build
Python setup.py Install
wget https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz#md5=01026f87978932060cc86c1dc527903e
Tar zxvf pip-1.5.6.tar.gz
CD pip-1.5.6
Python setup.py Build
Python setup.py Install
Load Environment variables
Vim/etc/profile
Export Path=/usr/local/python27/bin: $PATH
. /etc/profile
Pip Install Package # Install package pip install requests
Pip Show–files Package # See which files are installed when the package is installed
Pip Show–files Package # See which packages have updates
Pip Install–upgrade Package # Update a package
Pip Uninstall Package # Uninstall Package