pip安装包,遇到ssl错误问题

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

可成功安装;

 

你可能感兴趣的:(Python)