python - pip 国内的一些镜像

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/

中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

修改源方法:
临时使用:
可以在使用pip的时候在后面加上-i参数,指定pip源
eg:
pip install wxPython -i https://pypi.tuna.tsinghua.edu.cn/simple/


永久修改:
linux:
修改 ~/.pip/pip.conf (没有就创建一个), 内容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

windows:
直接在user目录中创建一个pip目录,如:C:\Users\xx\pip,新建文件pip.ini,内容如下
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

猜你喜欢

转载自www.cnblogs.com/uncle-fang/p/12555643.html