Simon Chang
Simon Chang

Reputation: 69

pip3: need attribute 'Cryptography_HAS_SSL_ST'

When I try to use pip3, after I give the command it shows me this error:

from OpenSSL import crypto, SSL   File "/usr/local/lib/python3.5/dist-packages/OpenSSL/SSL.py", line 194, in <module>
    if _lib.Cryptography_HAS_SSL_ST: AttributeError: module 'lib' has no attribute 'Cryptography_HAS_SSL_ST'

The same problem happened when I ran pip, after I reinstalled pip, pip is available again. But when I try to do the same re-installation on pip3, it didn't work. Can someone give me a clue how to deal with it?

Upvotes: 1

Views: 3418

Answers (2)

Suresh Kumar
Suresh Kumar

Reputation: 475

Try this. It resolved my problem

sudo apt-get remove python3-openssl

Upvotes: 3

Andrew Chong
Andrew Chong

Reputation: 174

Try this

cd /usr/local/lib/python3.5/dist-packages
mv OpenSSL/ ~/myOpenSSL

Then you will not observe OpenSSL related issues. I know that it's not solving the root of the problem but at least it will enable you to pip3 to fix the issues. You can revert your OpenSSL back if you don't like this.

Upvotes: 5

Related Questions