我使用的是 Mac OS 10.15.2 (Catalina)。预装了 Python 2 和 3.7 ( /usr/bin/python, /usr/bin/python3),我已经用 brew ( /usr/local/bin/python3)安装了 Python 3.6 。另外,我正在使用虚拟环境,如下所示:
virtualenv -p <dir_python> venv (创建 venv)source venv/bin/activate (激活venv)pip install <package> (安装软件包)当我使用 Python 2 和 3.7 创建虚拟环境时,一切正常。每当我使用 Python 3.6 时,我都无法安装任何东西。例如,使用“numpy”,我得到以下信息:
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 …Run Code Online (Sandbox Code Playgroud)