修改python包pip下载国内源


第一种方式-

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

附国内常用镜像源:
阿里云:https://mirrors.aliyun.com/pypi/simple/
中国科技大学:https://pypi.mirrors.ustc.edu.cn/simple/
清华大学:https://pypi.tuna.tsinghua.edu.cn/simple/

豆瓣(douban) http://pypi.douban.com/simple/
原始 https://pypi.python.org/simple

第二种方式-

在Linux系统中,修改~/.pip/pip.conf文件;在Windows系统中,修改C:\Users\XXX\pip\pip.ini文件。如果没有上述文件,需要手动建立。
在文件中输入以下内容:

[global] index-url = https://mirrors.aliyun.com/pypi/simple/ [install] trusted-host = mirrors.ustc.edu.cn
 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM