pip使用搜索找到软件包,但不会安装 [英] pip finds package with search but won't install it

查看:84
本文介绍了pip使用搜索找到软件包,但不会安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆