admin管理员组文章数量:1794759
python更改下载源地址 (WARNING: The repository located at mirrors.aliyun.com is not a trusted )
文章目录
- python更改下载源地址
- 工作中遇到的问题总结
- WARNING: The repository located at mirrors.aliyun is not a trusted
python默认的pip源在国外,如果下载比较大的第三方库时可能会非常非常慢,甚至会报错,所以为了有一个更加友好的python使用体验,建议为python的pip换一下源。
临时使用pip源
在使用pip时候,后面加上参数-i 镜像地址,例如:
pip3 install pygame -i mirrors.aliyun/pypi/simple/
永久修改:
pip config set global.index-url mirrors.aliyun/pypi/simple/
豆瓣・・・・・・・・・・・・・・・pypi.douban/ 华中理工大学・・・・・・・・pypi.hustunique/ 山东理工大学・・・・・・・・pypi.sdutlinux/ 中国科学技术大学・・・・pypi.mirrors.ustc.edu/ 阿里云・・・・・・・・・・・・・mirrors.aliyun/pypi/simple/
[root@localhost bin]# ./pip config set global.index-url mirrors.aliyun/pypi/simple/ Writing to /root/.config/pip/pip.conf 工作中遇到的问题总结 WARNING: The repository located at mirrors.aliyun is not a trustedWARNING: The repository located at mirrors.aliyun 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.aliyun’. ERROR: Could not find a version that satisfies the requirement Pillow3.4.2 (from versions: none) ERROR: No matching distribution found for Pillow3.4.2 WARNING: The repository located at mirrors.aliyun 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.aliyun’.
解决方法:根据错误提醒,添加 --trusted-host mirrors.aliyun 即可,如下
[root@localhost bin]# ./pip install -r requirements.txt --trusted-host mirrors.aliyun本文标签: 源地址repositorywarningPythonaliyun
版权声明:本文标题:python更改下载源地址 (WARNING: The repository located at mirrors.aliyun.com is not a trusted ) 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1686911612a117371.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论