A Python script of mine is failing with:
Traceback (most recent call last):
File \"./inspect_sheet.py\", line 21, in
main()
File \"./i
In my case, It was throwing the same error for uninstalling and upgrading. I couldn't uninstall or upgrade.
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
Following worked for me.
# rm -rf /usr/lib/python2.7/site-packages/OpenSSL/
# rm -rf /usr/lib/python2.7/site-packages/pyOpenSSL-16.1.0.dist-info
# rm -rf /usr/lib/python2.7/site-packages/pyOpenSSL-18.0.0-py2.7.egg
# pip2.7 install pyopenssl
Collecting pyopenssl
Downloading
.
.
100% |████████████████████████████████| 61kB 5.8MB/s
Collecting cryptography>=2.2.1 (from pyopenssl)
.
.
Installing collected packages: cryptography, pyopenssl
Found existing installation: cryptography 1.7.2
Uninstalling cryptography-1.7.2:
Successfully uninstalled cryptography-1.7.2
Successfully installed cryptography-2.2.2 pyopenssl-18.0.0
WARNING: Try this only if upgrading(sudo pip install pyOpenSSL==16.2.0) or uninstalling(pip uninstall pyopenssl) doesn't help