pip finds package with search but won't install it

前端 未结 3 1142
难免孤独
难免孤独 2020-12-24 12:10

When I run pip search linkchecker I get

linkchecker               - check websites and HTML documents for broken links

But whe

相关标签:
3条回答
  • 2020-12-24 12:57

    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
    
    0 讨论(0)
  • 2020-12-24 13:03

    update pip first.

    pip install --upgrade pip
    

    then, you can try install it again.

    0 讨论(0)
  • 2020-12-24 13:03

    I had the same problem for installing the ultramysql package from Github. However, trying the proposed solution of Hugo Tavares still gave the same error.

    What helped in my case was adding git+ in front of the url, resulsting in the following line of code:

    sudo pip install git+https://github.com/esnme/ultramysql
    
    0 讨论(0)
提交回复
热议问题