码迷,mamicode.com
首页 > 其他好文 > 详细

pip源提示“not a trusted or secure host” 解决

时间:2018-04-15 18:03:45      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:出现   cat   via   locate   pypi   mirror   tps   end   ISE   

今天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

这样就可以了。。

pip源提示“not a trusted or secure host” 解决

标签:出现   cat   via   locate   pypi   mirror   tps   end   ISE   

原文地址:https://www.cnblogs.com/Yemilice/p/8848313.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!