python pip报错pip._ vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
AttributeError: module 'pip' has no attribute 'main报错
找到安装目录下 helpers/packaging_tool.py文件,找到如下代码:
def do_install(pkgs):
try:
import pip
except ImportError:
error_no_pip()
return pip.main(['install'] + pkgs) def do_uninstall(pkgs):
try:
import pip
except ImportError:
error_no_pip()
return pip.main(['uninstall', '-y'] + pkgs)修改为如下,保存即可。
def do_install(pkgs):
try:
# import pip
try:
from pip._internal import main
except Exception:
from pip import main
except ImportError:
error_no_pip()
return main(['install'] + pkgs) def do_uninstall(pkgs):
try:
# import pip
try:
from pip._internal import main
except Exception:
from pip import main
except ImportError:
error_no_pip()
return main(['uninstall', '-y'] + pkgs)

- 在下载python库的时候,由于国内网络原因,python包的下载速度非常慢,查看pip 文档,只要在 pip的时候控制超时即可, 具体参数为 --default-timeout=100, 后面的时间可以自己指定。
- 解决方法
pip --default-timeout=100 install gevent

python pip报错pip._ vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.的更多相关文章
- 解决pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
参考链接[侵权删] https://www.jianshu.com/p/3378fa827924 https://yq.aliyun.com/articles/619208 问题描述:在Windows ...
- 错误:pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', ...
- pip安装超时问题-pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
手动设置延时:(推荐) pip --default-timeout=100 install nibabel --或者不使用缓存pip --no-cache-dir install Pillow 更改 ...
- 解决pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.问题
国内的其他镜像源清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/阿里云 http://mirrors.aliyun.com/pypi/simple/中国科技 ...
- 安装SpaCy出现报错:requests.exceptions.ConnectionError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443):
内含安装步骤及报错解决:https://www.cnblogs.com/xiaolan-Lin/p/13286885.html
- pip pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool
设置超时时间: pip --default-timeout=100 install Pillow
- python2.7使用requests时报错SSLError: HTTPSConnectionPool(host='b-ssl.duitang.com', port=443)
import requests url='https://www.duitang.com/napi/blog/list/by_search/?kw=%E6%A0%A1%E8%8A%B1&sta ...
- 解决python爬虫requests.exceptions.SSLError: HTTPSConnectionPool(host='XXX', port=443)问题
爬虫时报错如下: requests.exceptions.SSLError: HTTPSConnectionPool(host='某某某网站', port=443): Max retries exce ...
- 【Selenium】【BugList4】执行pip报错:Fatal error in launcher: Unable to create process using '""D:\Program Files\Python36\python.exe"" "D:\Program Files\Python36\Scripts\pip.exe" '
环境信息: python版本:V3.6.4 安装路径:D:\Program Files\python36 环境变量PATH:D:\Program Files\Python36;D:\Program F ...
随机推荐
- 【Vue】通过自定义指令回顾 v-内置指令
Vue.js 的各种指令(Directives)更加方便我们去数据驱动 DOM,例如 v-bind.v-on.v-model.v-if.v-for.v-once 等内置指令,这些指令的职责就是当表达式 ...
- nodejs、npm、 typescript、angular-cli安装
一.node.js环境安装 1.从Node.js官网下载对应平台的安装程序,进行安装,在Windows上安装时务必选择全部组件,包括勾选Add to Path. 2.安装完成后,打开window命令行 ...
- 10-js对象、数组
# js对象 ```1.使用原始的方式创建内置对象 var myObject = new Object(); myObject.name = “lijie”; myObject.age = 20; m ...
- vue项目 PC端点击查看大图
今天,发现了一款还不错的插件来实现查看大图,成熟度也比较高,支持各种操作 原作品的github地址为 https://github.com/mirari/v-viewer 也有对应的中文文档,使用方法 ...
- Python日志库logging总结
转自 https://cloud.tencent.com/developer/article/1354396 在部署项目时,不可能直接将所有的信息都输出到控制台中,我们可以将这些信息记录到日志文件中 ...
- 使用JavaBean对象存储表格数据
范例:表格内容接上篇 package cn.sxt.collection; import java.util.ArrayList;import java.util.Date;import java.u ...
- [BZOJ] 聚会
问题描述 Y 岛风景美丽宜人,气候温和,物产丰富.Y 岛上有 N 个城市,有 N-1 条城市间的道路连接着它们.每一条道路都连接某两个城市.幸运的是,小可可通过这些道路可以走遍 Y岛的所有城市. 神奇 ...
- vue对特殊特性的研究
key 预期:number | string key 的特殊属性主要用在 Vue 的虚拟 DOM 算法,在新旧 nodes 对比时辨识 VNodes.如果不使用 key,Vue 会使用一种最大限度减少 ...
- FMDB复习
// colum/列/字段// row/行/记录// 主键的作用是唯一标识一条记录// sql语句注意:不区分大小写,以分号结束(不要分号也行?) // 如果增加字段,可能要指定数据类型,S ...
- python全栈开发,Day41(线程概念,线程的特点,进程和线程的关系,线程和python理论知识,线程的创建)
昨日内容回顾 队列 队列:先进先出.数据进程安全 队列实现方式:管道+锁 生产者消费者模型:解决数据供需不平衡 管道 双向通信,数据进程不安全 EOFError: 管道是由操作系统进行引用计数的 必须 ...