当前位置:   article > 正文

There was a problem confirming the ssl certificate

there was a problem confirming the ssl certificate:

参考:https://blog.csdn.net/dou3516/article/details/111881479
使用pip install 某个包的时候报错ModuleNotFoundError: No module named ‘某个包’ ,错误原因是:

There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.tuna.tsinghua.edu.cn’, port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate

此时需要获得 ssl证书的认证,需要在原来的安装命令后增加:-i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com (也可换其他源)

例如:

pip install scipy
  • 1

改为:

pip install scipy -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
  • 1

说明:这是阿里源 --trusted-host mirrors.aliyun.com 这是为了获得ssl证书的认证

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/121039
推荐阅读
相关标签
  

闽ICP备14008679号