SSL(Secure Sockets Layer 安全套接层)
pip 安装 odrive时
pip install odrive
出现以下报错:
Could not install packages due to an EnvironmentError:
HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url:
/packages/15/77/66385527151644bab9ff99f5fc4d2a6d6a2eb051e8ce3757d59483ed0a24/odrive-0.4.11.tar.gz (Caused by SSLError(SSLCertVerificationError(1, '[SSL:
CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)')))
当前python版本是3.7,网上查找说是python高版本需要验证ssl,可以添加--trusted-host domain来解决;
命令变为:
pip install --trusted-host files.pythonhosted.org odrive
可成功安装;
本文解决了一个在使用pip安装odrive时遇到的SSL证书验证失败的问题,通过添加--trusted-host参数成功安装了软件包。适用于Python 3.7及更高版本。
312

被折叠的 条评论
为什么被折叠?



