1

I was trying to install pysftp using the command

pip3 install pysftp==0.2.9

But during the installation I got errors saying an uninstallation was unsuccesful

suddenly upon restarting python project, my complete pip seems to be destroyed. No matter what I do, event the pip --help command is enough and I will get this error

File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

here is the entire stack trace https://pastebin.com/b3v50QuM

I have tried to use the workaround from AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

But that just leads to more errors down the line,

I was trying to upgrade the module but every pip commands outputs that error.

I can not perform an upgrade or any pip command as any pip command just outputs the error

if fixing it is not possible, how can I reinstall the python package manager or reset it?

I have already tried reinstalling pip via apt, which worked but after the reinstallation I the error still persisted

unnamed-dev
  • 165
  • 8
  • 2
    You should use Python virtual environments to install anything with *pip*. -- It seems like your Python installation might be broken. If I were you I would try to reinstall Python itself. – sinoroc Mar 21 '23 at 11:33
  • 1
    Does this answer your question? [AttributeError: module 'lib' has no attribute 'X509\_V\_FLAG\_CB\_ISSUER\_CHECK'](https://stackoverflow.com/questions/73830524/attributeerror-module-lib-has-no-attribute-x509-v-flag-cb-issuer-check) – rasjani Mar 21 '23 at 11:34

1 Answers1

0

The Following steps solved the issue:

  1. navigate to the folder of your python installation
  2. navigate into the dist-packages folder
  3. force delete the OpenSSL Folder
  4. the pip command should now work again, install pyOpenSSL on the correct version
unnamed-dev
  • 165
  • 8