2012-03-04 149 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