A Python script of mine is failing with:
Traceback (most recent call last):
File \"./inspect_sheet.py\", line 21, in
main()
File \"./i
I had a similar error:
from OpenSSL import rand, crypto, SSL
File "/usr/local/lib/python3.5/dist-packages/OpenSSL/SSL.py", line 112, in
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: module 'lib' has no attribute 'SSL_ST_INIT'
and none of the other answers could fix it, because pip could not install anything. Instead, what I did was this from the terminal first:
sudo rm -r /usr/local/lib/python3.5/dist-packages/OpenSSL
Then reinstalled pyopenssl with pip:
sudo pip install pyopenssl
and everything was gravy.