Python错误集锦:The repository located at pypi.douban.com is not a trusted or secure host and is being ignored.

原文链接:http://www.juzicode.com/archives/2243

错误提示:

使用命令:pip install numpy -i http://pypi.douban.com/simple/ 安装模块时提示不是安全的主机:

The repository located at pypi.douban.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 pypi.douban.com’.
ERROR: Could not find a version that satisfies the requirement numpy (from versions: none)
ERROR: No matching distribution found for numpy

错误原因:

1、pip不能使用http类型的连接,必须使用https的安全连接。

解决方法:

1、在-i选项中使用https开头的网址,选择安全的https连接:

相关阅读:

  1. Python进阶教程m1–模块(module)

关注微信公众号:“桔子code”,欢迎后台留言撩我,我会尽我所能为你解惑Python,C等编程知识

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注