关于 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!问题解决!

猜你喜欢

转载自my.oschina.net/u/3222944/blog/1812396