Skip to content
Advertisement

Secrets pip not downloading MacOS

the secrets library is not downloading when I try to install the pip. My python is updated to 3.11.0. Wondering if that may be the issue?

Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      Traceback (most recent call last):
        File "/private/var/folders/bb/30cx945s3g9ftgw4q18zyw900000gn/T/pip-install-ll7ks8fq/secrets_1a6d2e6558c34836a716331c20614163/setup.py", line 10, in <module>
          import OpenSSL
      ModuleNotFoundError: No module named 'OpenSSL'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/bb/30cx945s3g9ftgw4q18zyw900000gn/T/pip-install-ll7ks8fq/secrets_1a6d2e6558c34836a716331c20614163/setup.py", line 12, in <module>
          raise ImportError('Installing this module requires OpenSSL python bindings')
      ImportError: Installing this module requires OpenSSL python bindings
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

The last note leads me to believe that it is to do with the library itself.

Advertisement

Answer

A the error mentions: ImportError: Installing this module requires OpenSSL python bindings, you are probably missing OpenSSL bindings. They are part of the cryptography package.

Install them with pip install cryptography and try again.

EDIT: Python 3.11 is like a few days old. If it does not work you can also try to downscale to 3.10 or 3.9 as the packages is probably not supported yet in 3.11.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement