Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip finds package with search but won't install it

Tags:

pip

When I run pip search linkchecker I get

linkchecker               - check websites and HTML documents for broken links

But when I try pip install linkchecker I get

  Could not find any downloads that satisfy the requirement linkchecker

What am i doing wrong?

like image 654
pseudosudo Avatar asked Mar 04 '12 23:03

pseudosudo


People also ask

Where does pip install search for packages?

pip looks for packages in a number of places: on PyPI (if not disabled via --no-index ), in the local filesystem, and in any additional repositories specified via --find-links or --index-url .

How do I apply a specific package to pip?

How do I Install a Specific Version of a Python Package? To install a specific version of a Python package you can use pip: pip install YourPackage==YourVersion . For example, if you want to install an older version of Pandas you can do as follows: pip install pandas==1.1. 3 .

What does pip Search do?

pip search command is used to search the index and identify packages that match the search terms. For example, python3 -m pip search pandas will return all the packages that satisfy the search term pandas .


2 Answers

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.

Use -vvv to see how pip looks for this package:

pip install linkchecker -vvv 

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 
like image 96
Hugo Tavares Avatar answered Oct 01 '22 12:10

Hugo Tavares


update pip first.

pip install --upgrade pip

then, you can try install it again.

like image 41
liuyang1 Avatar answered Oct 01 '22 10:10

liuyang1