Monday, April 15, 2024
 Popular · Latest · Hot · Upcoming
rated 0 times [  15] [ 0]  / answers: 1 / hits: 57095  / 3 Years ago, wed, august 25, 2021, 9:43:30

I was using python 3.6 on my ubuntu machine and faced this error when doing some testing:

CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release.
from OpenSSL import crypto, SSL
default: File "/usr/lib/python3/dist-packages/OpenSSL/", line 1550, in <module>
default: class X509StoreFlags(object):
default: File "/usr/lib/python3/dist-packages/OpenSSL/", line 1570, in X509StoreFlags
default: AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

Did research on the error. So I installed python 3.9 and then update alternatives to assign python 3.9 as the main python to use. Then I reinstall and upgrade OpenSSL and Cryptography.

sudo pip3 install pyOpenSSL --upgrade
sudo pip3 install cryptography --upgrade

I run my testing again and still face the same error.

I decided to check the python3.9 dist-packages folder (/usr/local/lib/python3.9/dist-packages/) and realise that OpenSSL and Cryptography are nowhere to be found. They are found in /usr/local/lib/python3.6/dist-packages/ instead. Could this be why the error persist?

More From » openssl


It seems to be due to pip 22.2.2 upgrade.
Check if you can upgrade pyOpenSSL to 22.0.0 to fix the issue.

Let me know if it is not working.

[#249] Friday, August 27, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 169
Total Questions: 105
Total Answers: 141

Location: Sao Tome and Principe
Member since Wed, Dec 29, 2021
2 Years ago