2012-03-04 96 views
21

當我運行pip search linkchecker我得到PIP封裝找到與搜索,但不會安裝它

linkchecker    - check websites and HTML documents for broken links 

但是當我嘗試pip install linkchecker我得到

Could not find any downloads that satisfy the requirement linkchecker 

我到底做錯了什麼?

+0

這很奇怪。它在[PyPI]上(http://pypi.python.org/pypi?%3Aaction=search&term=linkchecker&submit=search)。我嘗試使用明確的URL:'pip install http:// pypi.python.org/pypi/linkchecker/7.5'並得到這個:'不能確定/ tmp/pip-vRFtxt-build'的歸檔格式。從這張票看來,唯一的選擇是使用'setup.py':http://sourceforge.net/tracker/?func=detail&aid=3324146&group_id=1913&atid=101913 – bernie 2012-03-04 23:21:19

回答

31

pip使用http://pypi.python.org/simple/<package name>尋找下載鏈接,這個包指向一種「非明顯」的目標。 pip在源頁面中查找tarball/zip,但找不到合適的url。

使用-vvv看到點子如何查找此包:

pip install linkchecker -vvv 

您可以實現http://pypi.python.org/simple/linkchecker/http://sourceforge.net/projects/linkchecker/files/,並沒有.tar.gzhref,只能作爲內容,和PIP不能處理它。第一

pip install http://sourceforge.net/projects/linkchecker/files/latest/download?source=files#egg=linkchecker -vvvv 
+7

這將是很好的通知包作者關於這個安裝問題。 – 2012-03-07 19:18:58

4

更新PIP:

在這種情況下,你可以試試這個。

pip install --upgrade pip 

然後,你可以嘗試再次安裝它。

2

我在安裝Github的ultramysql軟件包時遇到同樣的問題。 但是,嘗試Hugo Tavares的建議解決方案仍然給出了相同的錯誤。

在什麼情況下,我是幫混帳添加在+網址的前面,在下面的代碼行resulsting:

sudo pip install git+https://github.com/esnme/ultramysql