problem description
pip failure (pip install pyOpenSSL is normal after pip install pyOpenSSL==16.0.0)
pip-V or pip list will report an error
pip uninstall pyOpenSSL will also report an error
the content of the error report is as follows:
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"
platform version in which the problem occurs
Linux web 3.10.0-693.2.2.el7.x86_64-sharp1 SMP Tue Sep 12 22:26:13 UTC 2017 x86 "64 GNU/Linux
pip 18.0 from / usr/lib/python2.7/site-packages/pip (python2.7)