一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

基于Python pip用国内镜像下载的方法

时间:2018-06-14 编辑:猪哥 来源:一聚教程网

异常信息:

Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)”,)': /simple/scipy/

通过pip安装scipy、scikit-learn等库的时候,可能会报上面的错误,国内通过翻墙手段,是可能解决该问题的。下面给个不用翻墙的办法。

使用国内镜像下载python库的办法。

以下载pandas为例,终端输入命令(前提是python正确安装):

pip install --index https://pypi.mirrors.ustc.edu.cn/simple/ pandas 

注:--index后面也可以换成别的镜像,比如http://mirrors.sohu.com/python/

热门栏目