Ubuntu永久修改python镜像源

1. 进入到“~”目录,查看当前目录下有没有.pip目录

1 ls -a

2. 如果没有需要手动创建

1 mkdir .pip
2 vim pip.conf

3. 编辑pip.conf的内容,保存退出

[global]
trusted-host =  pypi.douban.com
index-url = http://pypi.douban.com/simple

 

国内所有镜像源:

清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:http://pypi.hustunique.com/
山东理工大学:http://pypi.sdutlinux.org/
豆瓣:http://pypi.douban.com/simple/

posted @ 2020-03-07 15:19  雁过无声,风过无痕  阅读(1227)  评论(0)    收藏  举报