PIP安装模块下载慢或者无法下载
pip下载不动,模块安装失败
由于pip默认的下载源在国外,下载的人也多,难免有时会抽风,下载慢还能熬一熬,有时候就直接安装失败了。
安装gevent模块的的时候,进度条慢悠悠的到达100%,以为马上就成功了,结果又卡住了。python今天给我好好的上了一课,电脑就是工程师吃饭的家伙,这装不上怎么能行呢?看来是时候捣鼓一下我的电脑了。
其实卡住的原因很简单,本身网速慢,然后它不止一个gevent模块,还会有什么哥哥姐姐的关联模块。我真是吐血,那得下载到明年了。
解决方案如下:
通过添加配置文件永久更换pip安装源至国内镜像
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
中国科技大学: https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:http://pypi.hustunique.com/
山东理工大学:http://pypi.sdutlinux.org/
豆瓣:http://pypi.douban.com/simple/
1、在C:\Users\24030\下新建一个pip文件夹

2、在pip文件夹里面创建如下pip.ini文件,用于保存pip安装源地址
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple


3、文件保存好后,再来到cmd,输入pip install xxx的时候,你就会发现,无论安装什么模块,都是秒下载。

然后是导入gevent模块报错的解决方案
只需要执行一下下面这段代码就可以了
pip3 install -U --force-reinstall --no-binary :all: gevent
附上参数说明
-U, --upgrade
Upgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.
--force-reinstall
Reinstall all packages even if they are already up-to-date.
--no-binary <format_control>
Do not use binary packages. Can be supplied multiple times, and each time adds to the existing value. Accepts either :all: to disable all binary packages, :none: to empty the set, or one or more package names with commas between them. Note that some packages are tricky to compile and may fail to install when this option is used on them.
这条命令的大概意思就是使用非二进制的包重新安装gevent以及它的依赖。
总之在执行这个命令之后就完美的解决问题了。

它的哥哥姐姐也太多了吧,气死我了!
PIP安装模块下载慢或者无法下载的更多相关文章
- python使用pip安装模块出错 Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None))
python使用pip安装模块出错 Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) 问题: ...
- Python ----pip安装模块提示“unknown or unsupported command install”的解决办法
安装pip后,使用pip安装模块时,提示“unknown or unsupported command install” 解决方法: 1.cmd运行"where pip" 找出所有 ...
- python pip安装模块提示错误failed to create process
python pip安装模块提示错误failed to create process 原因: 报这个错误的原因,是因为python的目录名称或位置发生改动. 解决办法: 1.找到修改python所在的 ...
- python pip安装模块报错 "Can't connect to HTTPS URL because the SSL module is not available."
在升级python版本为3.6之后,pip安装模块报错. 报错信息如图: 原因是系统自带的openssl版本与python3的版本不匹配,所以这里只要升级openssl版本就可以解决问题. yum - ...
- windows下多Python环境指定pip安装模块到对应Python环境下
专栏:Python基础教程目录 专栏:使用PyQt开发图形界面Python应用 专栏:PyQt入门学习 老猿Python博文目录 老猿在windows下装了2套Python,一套是直接安装的Pytho ...
- Python用pip安装第三方库时换源下载
pip默认是从Python官网下载第三方库,从国外下载当然不如从国内下载来得快 豆瓣:https://pypi.doubanio.com/simple 还有其它源,阿里云等等,一个就够用了 用pip安 ...
- pip 安装模块时出现error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools":
在使用pip安装mysqlclient模块时,出现如下错误: 在网上查找资料后显示可能是由于不兼容导致的,最好去下载.whl文件安装成功. 资源地址:http://www.lfd.uci.edu/~g ...
- 全网最详细的用pip安装****模块报错:Could not find a version that satisfies the requirement ****(from version:) No matching distribution found for ****的解决办法(图文详解)
不多说,直接上干货! 问题详情 这个问题,很普遍.如我这里想实现,Windows下Anaconda2 / Anaconda3里正确下载安装用来向微信好友发送消息的itchat库. 见,我撰写的 全网最 ...
- 5.python之pip安装模块失败
本文是篇水文,主要是在学习python过程中总是遇到使用pip安装一些模块失败,记录一下安装模块解决办法 第一种方法: 首先安装wheel模块: pip install wheel 如果wheel都安 ...
随机推荐
- RNGCryptoServiceProvider 生成订单号
先生成1~1000的随机数 class Program { // Create a new instance of the RNGCryptoServiceProvider. private stat ...
- hadoop3.1.1 HA高可用分布式集群安装部署
1.环境介绍 涉及到软件下载地址:https://pan.baidu.com/s/1hpcXUSJe85EsU9ara48MsQ 服务器:CentOS 6.8 其中:2 台 namenode.3 台 ...
- linux中history加入显示时间命令代码
source 空格 配置文件,则配置立即生效,这里的soruce也可以用英文状态下的点即“.”代替 历史命令history -w将现在的命令记录写入到history里面 如果在history里面加上时 ...
- sqli-libs(38-41(堆叠注入)关)
补充知识:堆叠注入(Stacked injections) 从名词的含义就可以看到应该是一堆sql语句(多条)一起执行.而在真实的运用中也是这样的,我们知道在mysql中,主要是命令行中,每一条语句结 ...
- Abaqus 载荷分类(部分)
目录 1. 集中载荷 1.1 集中载荷施加方法 1.2 定义集中跟随力 1.3 指定文件定义集中节点力 2. 分布载荷 2.1 分布载荷分类 3. 热载荷 3.1 模拟热辐射 3.2 直接定义热流量 ...
- Java - Test - TestNG: testng.xml 元素 package
1. 概述 简介 package 元素 packages package exclude include 2. 背景 准备 自动生成了 testng.xml 文件 已经基本了解了 testng.xml ...
- JavaScript对象,函数,作用域
JavaScript对象 在 JavaScript中,几乎所有的事物都是对象.JavaScript 对象是拥有属性和方法的数据. var car = {type:"Fiat", m ...
- C++子类虚函数表指针
最近看剑指offer,记录一下 #include <iostream> #include <string> #include <cctype> #include&l ...
- MyBatis-Spring整合之方式3
通过注解整合 1.在UserDao同级目录下新建接口UserMapper,内容如下: public interface UserMapper { @Select("select * from ...
- RS422接口与RS485接口
RS422具体接线参考网站 RS485接口 RS485设备为半双工设备,RS485收发器信号相关引脚包括控制引脚.485A.485B,其中控制引脚的高低电平决定当前处于接收模式还是发送模式. RS48 ...