简体   繁体   中英

Why pip search can't find certain packages while they can be installed via pip install anyway

Why pip search can't find certain packages (for example, html5lib ) while they can be installed via pip install anyway?

E:\software\Python276\Scripts>pip search html5lib
html5lib-truncation       - Truncating HTML with html5lib filter
HTML-Sanitizer-With-IFrame - Extends Python html5lib's sanitizer.HTMLSanitizer
                            to allow iframe elements.
microdata                 - html5lib extension for parsing microdata
html5tidy                 - Simple wrapper around html5lib & lxml.etree to
                            "tidy" html in the wild to well-formed xml/html

E:\software\Python276\Scripts>pip install html5lib
Downloading/unpacking html5lib
  Running setup.py (path:c:\users\user\appdata\local\temp\pip_build_user\html5lib\setup.py) egg_info for package html5lib

Requirement already satisfied (use --upgrade to upgrade): six in e:\software\python276\lib\site-packages (from html5lib)
Installing collected packages: html5lib
  Running setup.py install for html5lib

Successfully installed html5lib
Cleaning up...

html5lib is hidden in pypi.python.org , so it won't show up in search results but can still be accessed directly:

    "_pypi_hidden": true, 

I don't know exactly why the package is hidden (it's just a flag in a database field) but I'd strongly suspect it's caused by the package's odd versioning system (most recent first):

  • 0.9999999/1.0b8
  • 0.999999/1.0b7
  • [...]
  • 0.99 No library changes from 1.0b3; released as 0.99 as pip has changed behaviour from 1.4 to avoid installing pre-release versions per PEP 440.
  • 1.0b3
  • [...]

The fix would be to release a proper 1.0 version that will show up above the beta versions and hopefully reset the hidden flag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM