1

I am getting odd errors that OpenSSL package has some problems. Earlier I insntalled PyCharm IDE that is built on pyenv environment, it may have somehow broken my OpenSSL. I have tried to install OpenSSL again with brew install openssl but errors such as the below persist.

How to install OpenSSL in Mac OSX Mojave 10.14.6?

pip3 install numpy
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Requirement already satisfied: numpy in /usr/local/lib/python3.7/site-packages (1.16.2)
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
2
  • It seems we only see part of the story currently. Can you add some details about the issue as a whole: what was the initial issue, what did you attempt to solve it, what is the current state?
    – nohillside
    Commented Mar 1, 2020 at 17:17
  • @nohillside potentially something to do with pyenv, venv created by PyCharm IDE or some of its packages. I am investigating this.
    – hhh
    Commented Mar 2, 2020 at 10:31

1 Answer 1

1

The SSL module is ordinarily a part of the python installation itself. The fact that you haven't got it doesn't mean that anything is wrong with your OpenSSL package or anything like that - rather it is python's own SSL module that is missing.

You can usually fix this by reinstalling python with this command from the Terminal:

brew reinstall python

The fact that you mention OpenSSL seems to indicate that you have received some messages about OpenSSL or in other ways that you haven't really told the full story in the few lines of output in your question. If this is the case, it could be that you're trying to recompile something that needs OpenSSL. In that case, you'll need to install the development files (headers) for OpenSSL using this command:

brew install openssl

Afterwards you can use stuff like the python installation manager to upgrade python like this:

pythonz install 3.8.2 --configure="--with-openssl=$(brew --prefix openssl)"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .