pip安装python包时超时或是报错“Cannot fetch index base URL http://e.pypi.python.org/simple/”
解决方法:加上参数"-i http://pypi.v2ex.com/simple",即换成国内镜像。
一劳永逸的办法:~/.pip/ 下创建文件 pip.conf(如果还没有的话),并填入以下内容:
1 [ global ]
2 timeout = 6000
3 index - url = http: / / pypi.v2ex.com / simple
4 [install]
5 use - mirrors = true
6 mirrors = http: / / e.pypi.python.org
标签:v2ex,http,python,pypi,simple,pip,镜像
From: https://blog.51cto.com/u_2700990/6314013