目录

错误现象

方法一:手动指定源

方法二:更改默认源

方法三:手动设置延时


错误现象

Collecting pipDownloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)0% |                                | 4.1kB 17.7MB/s eta 0:00:01Exception:
Traceback (most recent call last):File "/Library/Python/3.7/site-packages/pip-7.1.0-py3.7.egg/pip/basecommand.py", line 223, in mainstatus = self.run(options, args)File "/Library/Python/3.7/site-packages/pip-7.1.0-py3.7.egg/pip/commands/install.py", line 282, in runrequirement_set.prepare_files(finder)File "/Library/Python/3.7/site-packages/pip-7.1.0-py3.7.egg/pip/req/req_set.py", line 334, in prepare_filesfunctools.partial(self._prepare_file, finder))File "/Library/Python/3.7/site-packages/pip-7.1.0-py3.7.egg/pip/req/req_set.py", line 321, in _walk_req_to_installmore_reqs = handler(req_to_install)File "/Library/Python/3.7/site-packages/pip-7.1.0-py3.7.egg/pip/req/req_set.py", line 491, in _prepare_filesession=self.session)File "/Library/Python/3.7/site-packages/pip-7.1.0-py3.7.egg/pip/download.py", line 825, in unpack_urlsession,File "/Library/Python/3.7/site-packages/pip-7.1.0-py3.7.egg/pip/download.py", line 673, in unpack_http_urlfrom_path, content_type = _download_http_url(link, session, temp_dir)File "/Library/Python/3.7/site-packages/pip-7.1.0-py3.7.egg/pip/download.py", line 886, in _download_http_url_download_url(resp, link, content_file)File "/Library/Python/3.7/site-packages/pip-7.1.0-py3.7.egg/pip/download.py", line 621, in _download_urlfor chunk in progress_indicator(resp_read(4096), 4096):File "/Library/Python/3.7/site-packages/pip-7.1.0-py3.7.egg/pip/utils/ui.py", line 133, in iterfor x in it:File "/Library/Python/3.7/site-packages/pip-7.1.0-py3.7.egg/pip/download.py", line 586, in resp_readdecode_content=False):File "/Library/Python/3.7/site-packages/pip-7.1.0-py3.7.egg/pip/_vendor/requests/packages/urllib3/response.py", line 307, in streamdata = self.read(amt=amt, decode_content=decode_content)File "/Library/Python/3.7/site-packages/pip-7.1.0-py3.7.egg/pip/_vendor/requests/packages/urllib3/response.py", line 267, in readraise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.

方法一:手动指定源

在 pip3 后面跟-i 来指定源,比如用豆瓣的源来安装 web.py 框架:

pip3 install numpy -i https://pypi.doubanio.com/simple/

注意后面要有 /simple/ 目录

国内可用源:

阿里云 :https://mirrors.aliyun.com/pypi/simple/

中国科技大学 :https://pypi.mirrors.ustc.edu.cn/simple/

豆瓣(douban) :https://pypi.doubanio.com/simple/

清华大学: https://pypi.tuna.tsinghua.edu.cn/simple/

腾讯源:https://mirrors.cloud.tencent.com/pypi/simple

方法二:更改默认源

需要创建或修改配置文件( linux 的文件在~/.pip/pip.conf , windows 在%HOMEPATH%\pip\pip.ini ),修改内容为:

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com

如果不加后面的 install

则需要每次在命令后面加上 --trusted-host

方法三:手动设置延时

需要看包的大小,有时可以下载下来,有时会卡住

pip3 --default-timeout=1000 install numpy

python3 pip3 install 报错 ReadTimeoutError: HTTPSConnectionPool(host=‘xxx‘, port=443): Read timed 解决方法相关推荐

  1. 关于requests.exceptions.SSLError: HTTPSConnectionPool(host='XXX', port=443)问题

    在运行一下代码的时候,会进行报错 requests.exceptions.SSLError: HTTPSConnectionPool(host='XXX', port=443) 解决方法如下: 1.先 ...

  2. python3 pip3 install 报错 ModuleNotFoundError: No module named ‘_ctypes‘ 解决方法

    错误: 在腾讯云上pip install sklearn时报这个错误,如下: File "/usr/local/python3/lib/python3.7/ctypes/__init__.p ...

  3. 【报错】爬虫 HTTPSConnectionPool(host=‘xxx‘, port=443) 解决方案

    报错情况: 执行如下代码请求webscan.cc时报ssl错误: domain = "taobao.com" results = requests.get('https://www ...

  4. requests.exceptions.SSLError: HTTPSConnectionPool(host='XXX', port=443)问题

    具体报错是这样的: requests.exceptions.SSLError: HTTPSConnectionPool(host='某某某网站', port=443):Max retries exce ...

  5. requests.exceptions.SSLError: HTTPSConnectionPool(host=‘XXX‘, port=443)

    运行代码 import requestsresponse = requests.get("https://www.baidu.com") print(response.status ...

  6. Python requests ip代理爬虫报错 HTTPSConnectionPool(host=‘xxxxx‘, port=443) Max retries exceed

    本人系统:macOS10.15.6 Catalina 场景:使用Python requests 包+ip代理池爬取网站数据 出现报错:HTTPSConnectionPool(host='xxxxx', ...

  7. Python requests ip代理爬虫报错 HTTPSConnectionPool(host=‘xxxxx‘, port=443): Max retries exceed...

    本人系统:macOS10.15.6 Catalina 场景:使用Python requests 包+ip代理池爬取网站数据 出现报错:HTTPSConnectionPool(host='xxxxx', ...

  8. 解决requests.exceptions.SSLError: HTTPSConnectionPool(host=xxxxx‘, port=443): Max retries exceeded

    问题描述 使用scrapy框架时报错SSL,于是另起一个文件,使用requests,报错requests.exceptions.SSLError: HTTPSConnectionPool(host=' ...

  9. pip/pip3 install 报错 “Could not find a version that satisfies the requriement xxx” 的解决方法

    一.问题描述 pip/pip3 install 报错 "Could not find a version that satisfies the requriement xxx",如 ...

最新文章

  1. windows 如何cmd启动redis
  2. Spoken English(021)
  3. 什么是正确的JSON内容类型?
  4. 霍金:人工智能或是人类历史上最后事件
  5. FE之DR之线性降维:PCA/白化、LDA算法的数学知识(协方差矩阵)、相关论文、算法骤、代码实现、案例应用等相关配图之详细攻略
  6. 跟一个傻逼程序员合作是什么感受?
  7. javascript Blob
  8. UVA12290 Counting Game【数学模拟】
  9. Atitit mongodb 使用总结 1.1. 下载有点不太好下载不像mysql导出都是。。70M 1 1.2. gui工具Robomongo(MongoDB/GUI管理工具) v1.0.3 官方
  10. 航海王燃烧意志如何修改服务器,航海王燃烧意志自动战斗设置攻略 航海王燃烧意志自动战斗设置方法...
  11. chrome分辨率测试工具
  12. SegNet 论文解析
  13. 【重识云原生】第四章云网络第二节——相关基础知识准备
  14. Undefined class constant ‘SERIALIZER_IGBINARY‘ 解决方法
  15. 支付宝沙箱版app登入失败账户不存在问题
  16. 技术设计的任务是将功能原理方案得以具体化
  17. docker stop all containers
  18. window7中出现 你需要权限来执行此操作 的解决方法
  19. java 文本文件加密 文本文件解密
  20. Oracle Database-PL/SQL

热门文章

  1. sql 优化之:聚集索引的重要性和如何选择聚集索引(系列五)
  2. [快报][贴图] ANSI Art 的新形式 - CSS-ANSI Art
  3. ci github 通知_初探CI,Github调戏Action手记——自动构建并发布
  4. 计算机组成原理 — 数字集成电路(芯片)
  5. Tungsten Fabric SDN — 网络协议
  6. SDN — 核心玩家与技术流派
  7. Windwos 08R2_DNS+AD安装图文
  8. 001-测试用例简介
  9. 实验5 编写调试有多个段的程序
  10. 【412天】跃迁之路——程序员高效学习方法论探索系列(实验阶段169-2018.03.24)...