關於 pip安裝的可能錯誤的排除

轉載地址:http://www.cnblogs.com/botoo/p/7410316.htmlhtml

今天安裝wheel和lxml老是報錯(下爲錯誤信息)python

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
)ui

No matching distribution found for wheelspa

能夠解決問題的解決方法:命令行

此狀況只用於網絡不順暢的安裝模塊背景:xml

 

總出現紅色的htm

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

你可能會遇到下面這樣的狀況:ip

是由於網絡的問題,要使用國內的鏡像源來加速

 

解決辦法:

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

例如:本來執行的命令是:

pip install wheel

改成:

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

結果會就成功:

 

ok!問題解決!

相關文章
相關標籤/搜索