从昨天开始,我在通过PIP安装任何新软件包时遇到了困难。我不断遇到这个ssl错误,这是我以前从未遇到过的:
ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org.x.a21a7e8f0e3c70499e099e6035cdeac3ac53.9270f642.id.opendns.com', port=443): Max retries exceeded with url: /s/files.pythonhosted.org/packages/fa/b1/e7a3d321144e7701ad0850b82cb727407a273c80d5917a3acd2273ac6ec4/pyodbc-4.0.28-cp37-cp37m-win_amd64.whl?X-OpenDNS-Session=_a21a7e8f0e3c70499e099e6035cdeac3ac539270f6
42_d8yAgKPJ_ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (**_ssl.c:1076**)')))
我已经解决了与pip上SSL错误有关的所有问题,并且尝试了以下操作:
pip.ini
文件定义了trusted-host = pypi.python.org pypi.org files.pythonhosted.org
和cert = ~\AppData\Local\pip\cacert.pem
pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org pyodbc
pip --cert ~\AppData\Local\pip\cacert.pem pyodbc
我尝试在虚拟环境中的Windows 10上运行此程序,也尝试从Ubuntu Docker容器运行此程序,但绝对没有成功。
我还有什么可以尝试的?