1. pip安装requests模块超时

[root@2 zabbix_agentd.d]# pip install requests
Collecting requests
/usr/lib/python2./site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/lib/python2./site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading requests-2.18.-py2.py3-none-any.whl (88kB)
% |████████████████████████████████| 92kB .1kB/s
Collecting chardet<3.1.,>=3.0. (from requests)
Downloading chardet-3.0.-py2.py3-none-any.whl (133kB)
% |████████████████████████████████| 143kB 819bytes/s
Collecting urllib3<1.23,>=1.21. (from requests) Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line , in main
status = self.run(options, args)
File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line , in run
requirement_set.prepare_files(finder)
File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line , in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line , in _prepare_file
session=self.session, hashes=hashes)
File "/usr/lib/python2.7/site-packages/pip/download.py", line , in unpack_url
hashes=hashes
File "/usr/lib/python2.7/site-packages/pip/download.py", line , in unpack_http_url
hashes)
File "/usr/lib/python2.7/site-packages/pip/download.py", line , in _download_http_url
_download_url(resp, link, content_file, hashes)
File "/usr/lib/python2.7/site-packages/pip/download.py", line , in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/usr/lib/python2.7/site-packages/pip/utils/hashes.py", line , in check_against_chunks
for chunk in chunks:
File "/usr/lib/python2.7/site-packages/pip/download.py", line , in written_chunks
for chunk in chunks:
File "/usr/lib/python2.7/site-packages/pip/utils/ui.py", line , in iter
for x in it:
File "/usr/lib/python2.7/site-packages/pip/download.py", line , in resp_read
decode_content=False):
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line , in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line , in read
flush_decoder = True
File "/usr/lib64/python2.7/contextlib.py", line , in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line , in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=): Read timed out.

2. 解决方法,加大超时时间

pip --default-timeout= install -U requests

pip安装第三方包超时的更多相关文章

  1. (python pip安装第三方库超时问题(raise ReadTimeoutErrorself._pool, None, 'Read timed out.')

    (python pip安装第三方库超时问题(raise ReadTimeoutErrorself._pool, None, ‘Read timed out.’)pip工具安装百度经验链接: pip安装 ...

  2. 解决Python pip安装第三方包慢的问题

    解决Python pip安装第三方包慢的问题 主要是修改源,国内的源有几个 阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi ...

  3. pip安装第三方包总失败

    第一步:升级pip python -m pip install -U pip 第二布:安装想下载的第三方包 python -m pip install xx 一般来说pip安装不会失败的,失败的话就尝 ...

  4. pip 安装第三方包提示Unknown or unsupported command 'install'

    Unknown or unsupported command 'install' Unknown or unsupported command 'show' Unknown or unsupporte ...

  5. 解决pip安装第三方包编码错误:UnicodeDecodeError: 'ascii' codec can't decode byte....

    .../python27/Lib/mimetypes.py 在 import之后添加下列内容 if sys.getdefaultencoding() != 'gbk': reload(sys) sys ...

  6. pip安装第三方库报错Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None))...

    pip安装第三方库时报错Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None))...,详细报错见下 ...

  7. Python安装第三方包(模块/工具)出现链接超时,网速慢,安装不上的问题如何解决

    之前我的电脑重新装了系统以后,发现安装完Python后, 使用pip linstall 安装第三方包的时候,网速慢的一匹 有时候只有几百b/s ,而且还动不动就会出现无法安装,链接超时等问题. 今天我 ...

  8. 用anaconda的pip安装第三方python包的日志

    用anaconda的pip安装第三方python包的日志 启动anaconda命令窗口: 开始> 所有程序> anaconda> anaconda prompt 会得到两行提示: D ...

  9. pip安装拓展包--网络超时/Read timed out问题

    pip安装拓展包--网络超时/Read timed out问题 解决方案:切换镜像源(墙皮太厚) 在后面加上: -i https://pypi.douban.com/simple example: p ...

随机推荐

  1. Docker编写镜像 发布个人网站

    推荐国内镜像中心:网易云镜像----> https://c.163.com/hub#/home  或者歪果镜像---> https://hub.docker.com/ 博客地址:http: ...

  2. python创建DataFrame,并实现DataFrame的转置

    >>> import pandas as pd >>> import numpy as np >>> x1 = {1: 106, 2: 3, 7: ...

  3. python将指定目录下的所有文件夹用随机数重命名

    我的目的在于打乱数据顺序,便于GAN训练: import random import os path = 'hunhe_7' #目标文件夹 listname = os.listdir(path) #遍 ...

  4. QUIC/HTTP3 协议简析

    从 HTTP 的进化历史讲起,细说使用协议的变迁,了解原因发现问题,解码 QUIC 在 HTTP3 中的支撑作用,共同探讨 HTTP3 的未来. HTTP.HTTP2 和 HTTP3 先和大家来回顾一 ...

  5. Nginx配置upstream实现负载均衡1

    如果Nginx没有仅仅只能代理一台服务器的话,那它也不可能像今天这么火,Nginx可以配置代理多台服务器,当一台服务器宕机之后,仍能保持系统可用.具体配置过程如下: 1. 在http节点下,添加ups ...

  6. 小师妹学JVM之:JIT中的PrintAssembly续集

    目录 简介 JDK8和JDK14中的PrintAssembly JDK8中使用Assembly JDK14中的Assembly 在JMH中使用Assembly 总结 简介 上篇文章和小师妹一起介绍了P ...

  7. Python优秀开源项目Rich源码解析

    这篇文章对优秀的开源项目Rich的源码进行解析,OMG,盘他.为什么建议阅读源码,有两个原因,第一,单纯学语言很难在实践中灵活应用,通过阅读源码可以看到每个知识点的运用场景,印象会更深,以后写代码的时 ...

  8. nginx限制访问域名,禁止IP访问

    有些时候我们希望系统只能通过固定的域名访问,禁止IP或者恶意绑定的域名访问. 下面的nginx配置,假如host变量不是指定的域名,将返回403. server { listen 80; server ...

  9. python面试题二:Python 基础题

    1.位和字节的关系? Byte 字节 bit 位 1Byte = 8bit 2.b.B.KB.MB.GB 的关系? 1Byte = 8bit KB 1KB=1024B MB 1MB=1024KB GB ...

  10. 我为什么不再推荐 RxJava

    本文转自作者: W_BinaryTree 链接:juejin.im/post/5cd04b6e51882540e53fdfa2,如有侵权,可删除 距离上一次更新也有一段时间了,其实这篇文章我早就想写, ...