关于 pip安装的可能错误的排除

转载地址:http://www.cnblogs.com/botoo/p/7410316.html

今天安装wheel和lxml总是报错(下为错误信息)

C:\Python27\Scripts>pip install wheel

Collecting wheel
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after
tion broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.or
rt=443): Read timed out. (read timeout=15)",)': /simple/wheel/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after
tion broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.or
rt=443): Read timed out. (read timeout=15)",)': /simple/wheel/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after
tion broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.or
rt=443): Read timed out. (read timeout=15)",)': /simple/wheel/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after
tion broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.or
rt=443): Read timed out. (read timeout=15)",)': /simple/wheel/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after
tion broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.or
rt=443): Read timed out. (read timeout=15)",)': /simple/wheel/
  Could not find a version that satisfies the requirement wheel (from vers
)

No matching distribution found for wheel

可以解决问题的解决方法:

此情况只用于网络不畅的安装模块背景:

总出现红色的

Could not find a version that satisfies the requirement pymongo(from version:)

你可能会遇到下面这样的情况:


是因为网络的问题,要使用国内的镜像源来加速


解决办法:

你需要的是在你的命令行下面添加一句

例如:原本执行的命令是:

pip install wheel

改为:

pip install wheel -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

结果会就成功:


ok!问题解决!


  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值