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:
virtualenv -p <dir_python> venv
(to create venv)source venv/bin/activate
(to activate venv)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.