2

On my WSL im getting the error AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK' whenever I try to use pip e.g. pip list, python3 -m pip, etc.

Is there a way to reinstall pip or uninstall packages without using pip? I tried following the solutions in related Questions but none of them work because they either use pip or the problem persists after.

nordlad
  • 31
  • 1
  • 1
  • 4
  • 1
    https://www.google.com/search?q=AttributeError%3A+module+lib+has+no+attribute+X509_V_FLAG_CB_ISSUER_CHECK – phd Dec 06 '22 at 16:32

1 Answers1

11

The solution that worked for me was mentioned here. you have to remove the line:

CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK

from this file:

/usr/lib/python3/dist-packages/OpenSSL/crypto.py

and then you can use pip again:

$ pip uninstall cryptography
$ pip install --upgrade cryptography==36.0.2
Greg Kramida
  • 4,064
  • 5
  • 30
  • 46
eljapi
  • 146
  • 1
  • 4