这个问题一般是因为升级到python2.7后执行pip产生的,解决方案是从新在python2.7环境中安装pip,步骤以下:python
系统:centos7(建议用centos7,6的话须要升级的库太多,glibc也得升级,升级很差就虾米了)centos
1.安装distributepython2.7
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 installide
2.安装setuptool
https://pypi.python.org/pypi/setuptools 下载最新版centos7
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-12.0.3.tar.gz#md5=f07e4b0f4c1c9368fcd980d888b29a65
tar -zxvf setuptools-12.0.3.tar.gz
cd setuptools-12.0.3
python setup.py installip
3.安装pip
easy_install pipmd5
4.若是安装pip过程当中报ImportError: No module named extern异常get
https://pypi.python.org/pypi/extern 下载最新extern安装后再次尝试便可it