這個問題通常是由於升級到python2.7後執行pip產生的,解決方案是重新在python2.7環境中安裝pip,步驟如下:
系統:centos7(建議用centos7,6的話需要升級的庫太多,glibc也得升級,升級不好就蝦米了)
1.安裝distribute
wget https://pypi.python.org/packages/source/d/distribute/distribute-0.7.3.zip --no-check-certificate
unzip distribute-0.7.3.zip
cd distribute-0.7.3
python setup.py install
2.安裝setuptool
https://pypi.python.org/pypi/setuptools 下載最新版
解決並進入目錄
python setup.py install
3.安裝pip
easy_install pip
4.如果安裝pip過程中報ImportError: No module named extern異常
https://pypi.python.org/pypi/extern 下載最新extern安裝後再次嘗試即可