Quantcast
Channel: CodeSection,代码区,Python开发技术文章_教程 - CodeSec
Viewing all articles
Browse latest Browse all 9596

[Python]Python pip用国内镜像下载的办法

$
0
0
[python]Python pip用国内镜像下载的办法

http://blog.csdn.net/u010536377/article/details/50564185

异常信息:

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正确安装):

在CODE上查看代码片派生到我的代码片

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

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


Viewing all articles
Browse latest Browse all 9596

Trending Articles