WARNING: Certificate did not match expected hostname: mirrors.cloud.aliyuncs.com.

我遇到了两个问题

第一个:

WARNING: The repository located at mirrors.cloud.aliyuncs.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with ‘–trusted-host mirrors.cloud.aliyuncs.com’.。。。。。。

我根据报错的信息,打开了root/.pip/pip.conf,如何在http前面加了个s,https如何保存,结果又报错了,我很无语,懒得看错误了

WARNING: Certificate did not match expected hostname: mirrors.cloud.aliyuncs.com.。。。。。。

直接去网上找吧,功夫不负有心人!!

折腾半小时,终于找到了解决办法,

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted-host mirrors.aliyun.com

输入pip config list
WARNING: Certificate did not match expected hostname: mirrors.cloud.aliyuncs.com.
大功告成

上一篇:Ubuntu 快速更换阿里源


下一篇:VS自动生成有参构造函数并自动依赖注入插件