本文主要是介绍pip install出错 not a trusted or secure host解决方案,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
使用sudo pip install packname时会提示错误:
The repository located at http://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’.
解决方法是,修改pip配置文件~/.pip/pip.conf如下:
[global]
timeout = 6000
index-url = http://pypi.douban.com/simple/
[install]
use-mirrors = true
mirrors = http://pypi.douban.com/simple/
trusted-host = pypi.douban.com
这篇关于pip install出错 not a trusted or secure host解决方案的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!