python使用pip安装模块出现ReadTimeoutError: HTTPSConnectionPool的解决方法
今天使用pip安装第三库时,有时会报错:
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
使用镜像:pip install xxxx -i https://pypi.douban.com/simple 如下:
pip install virtualenv -i https://pypi.douban.com/simple
这时可以换成国内源:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple module_name
或
pip install -i https://pypi.douban.com/simple module_name
第一个安装不行就换第二个试试。
其实用anaconda安装就比较快,不会出现这个问题
conda install module_name
即可
下面是其它网友的补充
一般情况下PIP出现ReadTimeoutError都是因为被GFW给墙了,所以一般遇到这种问题,我们可以选择国内的镜像来解决问题。
在Windows下:
C:\Users\Administrator\下新建pip文件夹,在创建pip.ini文件,拷贝下面代码进去,保存。
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
其实就是把python的源换成了清华源,应该能解决问题。
2016.12.4解决办法
延长等待时间完美解决问题
windows下在cmd中,linux在终端下输入如下命令:
pip --default-timeout=100 install -U pip
- pip升级出错解决方法ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read ti med out.
- pip安装scrapy报错 ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org, port=443) Read time out
- pip install Error - ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read
- pip install Error - ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read
- pip install Error - ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read
- pip install Error - ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read
- ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.
- Python安装模块出现问题UnicodeDecodeError的解决方法
- Python 安装模块时,使用pip install xxx安装时,很慢的解决方法
- 关于Python安装模块出现error: command 'gcc' failed with exit status 1错误的解决方法
- 使用pip install时报错:ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed
- Python package下载中遇到ReadTimeoutError: HTTPSConnectionPool?
- pip install Error - ReadTimeoutError: HTTPSConnectionPool
- Python使用pip安装第三方库时出现UnicodeError的解决办法(Windows平台下)
- (python pip安装第三方库超时问题(raise ReadTimeoutErrorself._pool, None, 'Read timed out.')
- Python报错pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool解决方法
- python中使用pip安装报错:Fatal error in launcher...解决方法
- windows下使用pip安装模块发生“failed with error code 1”的解决方法
- Python使用pip安装第三方库时出现UnicodeError的解决办法(Windows平台下)
- ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.