pip install pyOpenSSL后pip故障
问题描述
pip install pyOpenSSL==16.0.0后pip故障(pip install pyOpenSSL正常)
pip -V或pip list会报错
pip uninstall pyOpenSSL也会报错
报错内容都是下面内容:
Traceback (most recent call last):
File "/usr/bin/pip", line 7, in <module>
from pip._internal import main
File "/usr/lib/python2.7/site-packages/pip/_internal/__init__.py", line 42, in <module>
from pip._internal import cmdoptions
File "/usr/lib/python2.7/site-packages/pip/_internal/cmdoptions.py", line 16, in <module>
from pip._internal.index import (
File "/usr/lib/python2.7/site-packages/pip/_internal/index.py", line 14, in <module>
from pip._vendor import html5lib, requests, six
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py", line 97, in <module>
from pip._vendor.urllib3.contrib import pyopenssl
File "/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py", line 46, in <module>
import OpenSSL.SSL
File "/usr/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/lib/python2.7/site-packages/OpenSSL/SSL.py", line 124, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
问题出现的平台版本
Linux web 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
pip 18.0 from /usr/lib/python2.7/site-packages/pip (python 2.7)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
16.2.0+ 版本貌似修复了这个issue。先清除掉已安装的package再试一下
pip install pyOpenSSL==16.2.0