1.為什么這么做?
Python里的pip是官方自帶的源,國內使用pip安裝的時候十分緩慢,所以最好是更換成中國國內的源地址。
2.准備工作:
1 目前國內靠譜的 pip 鏡像源有: 2 3 清華: https://pypi.tuna.tsinghua.edu.cn/simple 4 5 豆瓣: http://pypi.douban.com/simple/ 6 7 阿里: http://mirrors.aliyun.com/pypi/simple/
3.怎么做?
3.1
3.2
3.3
3.4
3.5
如果以上方法還是不可以的話 Windows下找到Python根目錄下的pip文件夾,在文件夾內 新建一個文件pip.ini: [global] timeout = 6000 index-url = https://pypi.tuna.tsinghua.edu.cn/simple trusted-host = https://pypi.tuna.tsinghua.edu.cn
4.大功告成