pip 国内镜像设置

鉴于pypi上下东西越来越困难,用一个镜像现阶段是最好的解决方式。

需要在配置文件内加上:

1
2
3
4
5
6
7
8
9
10
[global]
timeout = 6000
index-url = http://pypi.v2ex.com/simple
[install]
use-mirrors = true
mirrors = http://pypi.v2ex.com/

#或单纯的就写
[global]  
index-url=http://pypi.v2ex.com/simple