pip类似RedHat里面的yum,安装Python包非常方便装
一、pip的安装(方法一)
cd /usr/local/src
wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb" --no-check-certificate
tar -xzvf pip-1.5.4.tar.gz
cd pip-1.5.4
python setup.py install
如果上述出现ImportError: No module named setuptools 的解决方案
cd /usr/local/src
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz --no-check-certificate
tar zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python setup.py build
python setup.py install
二、pip安装(方法二)
cd /usr/local/src
wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate -O ./get-pip.py
python get-pip.py
三、pip更换国内源地址
cd
mkdir .pip
vim .pip/pip.conf
[global]
index-url = http://pypi.douban.com/simple
[install]
trusted-host = pypi.douban.com