1.pip源配置文件的放置位置(沒有則自己創建):
Linux/Unix:(親測有效)
~/.pip/pip.conf
Windows:
C:\ProgramData\PyPA\pip\pip.conf (Windows 7及以後)
2.pip的部分國內鏡像:
阿里雲 http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣 http://pypi.douban.com/simple/
清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/(本人使用)
中國科學技術大學 http://pypi.mirrors.ustc.edu.cn/simple/
3.在配置文件中加入如下配置:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple