【Python】用pip安装python库下载超时的解决办法
2017-08-07 10:26
537 查看
超时提示
During handling of the above exception, another exception occurred:Traceback (most recent call last):
########################################
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.requests.packages.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.
解决办法
源地址不稳定,下载速率慢,可以通过修改源地址解决。方法一
直接在命令行中指定源地址,如下:pip install -i https://pypi.doubanio.com/simple/ 包名或者:
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple 包名以上两个源地址的下载速度都很快。
方法二
在配置文件中修改源地址,如下:建一个 ~/.pip/pip.conf文件,添加内容如下
[global] index-url = http://b.pypi.python.org/simple [install] use-mirrors = true mirrors = http://b.pypi.python.org[/code]也可以在[global]中加入timeout = 6000,以防止网速过慢情况下包下载不完
相关文章推荐
- pip安装python库总提示下载超时read timed out的解决办法
- pip安装python库总是超时或出错的解决办法
- Win10下python3和python2同时安装并解决pip共存问题 特别说明,本文是在Windows64位系统下进行的,32位系统请下载相应版本的安装包,安装方法类似。 使用python开
- python安装第三方库超时报错“Read time out”的解决办法
- ubuntu14.0 docker 镜像 pip install python相关的包,下载速度很慢很慢的解决办法
- python pip安装错误 ConnectTimeoutError错误解决办法
- Python使用pip安装第三方库时出现UnicodeError的解决办法(Windows平台下)
- Python pip安装时“failed building wheel for xxx”问题解决办法
- Python使用pip安装第三方库时出现UnicodeError的解决办法(Windows平台下)
- 【Python】pip安装numpy安装到一半失败解决办法
- Python-利用国内镜像解决PIP下载安装速度
- python2.7,Ubuntu14.04环境下pip安装插件,cffi插件出现一下错误解决办法。
- PIP安装Python的scipy,scrapy等包出现“failed building wheel for xxx”问题解决办法
- 解决国内网络Python2.X 3.X PIP安装模块连接超时的问题
- CentOS7上 pip install MySQL-python 安装失败(error: command 'gcc' failed with exit status 1)的解决办法
- Ubuntu16.04上使用Anaconda3的Python3.6的pip安装UWSGI报错解决办法
- PIP安装Python的scipy,scrapy等包出现“failed building wheel for xxx”问题解决办法
- win7下python3.6通过pip安装scipy报错的解决办法
- Python中用pip安装selenium提示:unknow or unsupported command install的解决办法