pip使用搜索找到软件包,但不会安装 [英] pip finds package with search but won't install it
问题描述
当我运行pip search linkchecker
时,我得到
linkchecker - check websites and HTML documents for broken links
但是当我尝试pip install linkchecker
时我会得到
But when I try pip install linkchecker
I get
Could not find any downloads that satisfy the requirement linkchecker
我在做什么错了?
推荐答案
pip
使用http://pypi.python.org/simple/<package name>
查找下载链接,该软件包指向一种非显而易见的"目标. pip
在源页面中查找tarball/zip,但找不到合适的URL.
pip
uses http://pypi.python.org/simple/<package name>
to look for download links, and this package points to a kind of "non-obvious" target. pip
looks for tarballs/zips in the source page, but can't find a suitable url.
使用-vvv
来查看pip查找此软件包的方式:
Use -vvv
to see how pip looks for this package:
pip install linkchecker -vvv
您可能会意识到 http://pypi.python.org/simple/linkchecker/指向 http://sourceforge.net/projects/linkchecker/files/,并且没有.tar.gz
作为href
作为内容,而pip无法处理.
You may realize http://pypi.python.org/simple/linkchecker/ points to http://sourceforge.net/projects/linkchecker/files/, and there is no .tar.gz
as href
, only as content, and pip can't handle it.
在这种情况下,您可以尝试以下操作:
In this case you could try this:
pip install http://sourceforge.net/projects/linkchecker/files/latest/download?source=files#egg=linkchecker -vvvv
这篇关于pip使用搜索找到软件包,但不会安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!