5

I’m on Mac OS 10.15.2 (Catalina). Python 2 and 3.7 were pre-installed (/usr/bin/python, /usr/bin/python3), and I have installed Python 3.6 with brew (/usr/local/bin/python3). Also, I’m using a virtual environment as follows:

  1. virtualenv -p <dir_python> venv (to create venv)
  2. source venv/bin/activate (to activate venv)
  3. pip install <package> (to install packages)

When I use Python 2 and 3.7 to create the virtual env, everything works fine. Whenever I'm using Python 3.6 I cannot install anything. For example, with 'numpy', I get the following:

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/numpy/

... retrying for four more times ...  

Could not fetch URL https://pypi.org/simple/numpy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/numpy/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping

ERROR: Could not find a version that satisfies the requirement numpy (from versions: none)

ERROR: No matching distribution found for numpy

I have tried a few things from other posts that described what was appearing to be something similar but none of the following helped, such as:

  • Uninstalling and re-installing Python 3.6
  • pip install --upgrade pip --trusted-host pypi.org --trusted-host files.pythonhosted.org pip setuptools

Any help is much appreciated! Thanks.

KM.
  • 113
  • 1
  • 5
  • 1
    This one worked for me: [Scroll down](https://stackoverflow.com/questions/45954528/pip-is-configured-with-locations-that-require-tls-ssl-however-the-ssl-module-in) – shehio Apr 12 '20 at 17:07

1 Answers1

2

I've had the same issue.

To fix it, I just updated python using brew.

brew upgrade python3

ozej8y
  • 21
  • 2