Python AttributeError: 'module' object has no attribute 'SSL_ST_INIT' Python AttributeError: 'module' object has no attribute 'SSL_ST_INIT' python python

Python AttributeError: 'module' object has no attribute 'SSL_ST_INIT'


Upgrading pyopenssl with pip was not working as none of the commands related to to pip was working for me. By upgrading pyopenssl with easy_install, above problem can be solved.

sudo python -m easy_install --upgrade pyOpenSSL

credit @delimiter (Answer)


Turned out the problem was with my installation of pyOpenSSL, pyOpenSSL-0.15.1 .

I did:

pip uninstall pyopenssl

and then

pip install pyopenssl

...and my Python script worked again!


Update your pyopenssl module:

$ sudo pip install -U pyopenssl