pip不可用报错如下

from .packages.urllib3.contrib import pyopenssl
File "/usr/local/lib/python2.7/dist-packages/pip-8.1.1-
  py2.7.egg/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py", 
line 
54, in <module>
 import OpenSSL.SSL
   File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in 
  <module>
    from OpenSSL import rand, crypto, SSL
    File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in 
<module>
 SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

pyOpenSSL损坏导致的pip不可用,
使用easy_install更新

sudo python -m easy_install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pyOpenSSL