Yemilice

博客已经迁移:https://www.yemilice.com/ 文章不会再双更新,感谢多年陪伴,新博再见。

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

今天pip出现了一个莫名其妙的问题

The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. 
If this repository is available via HTTPS it is recommended to use HTTPS instead, 
otherwise you may silence this warning and allow it anyways with '--trusted-host mirrors.aliyun.com'.

这段的意思是现在已经采用了HTTPS源,否则直接报错。

解决办法:
pip.conf 加上

trusted-host = mirrors.aliyun.com

也就是说,你的pip.conf文件的最终形态:

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
trusted-host = mirrors.aliyun.com

这样就可以了。。

posted on 2018-04-15 17:17  Yemilice  阅读(2813)  评论(0编辑  收藏  举报