4

为什么无论如何都可以通过安装pip search某些软件包(例如, ) ?html5libpip install

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...
4

1 回答 1

4

html5lib隐藏在 pypi.python.org 中,因此它不会出现在搜索结果中,但仍然可以直接访问:

    "_pypi_hidden": true, 

我不知道为什么包被隐藏(它只是数据库字段中的一个标志),但我强烈怀疑它是由包的奇怪版本控制系统引起的(最近的第一个):

  • 0.9999999/1.0b8
  • 0.999999/1.0b7
  • [...]
  • 0.99与 1.0b3 相比没有库更改;发布为 0.99,因为 pip 已从 1.4 更改了行为,以避免根据 PEP 440 安装预发布版本。
  • 1.0b3
  • [...]

解决方法是发布一个适当的 1.0 版本,该版本将显示在 beta 版本之上,并希望重置隐藏标志。

于 2016-03-16T10:19:08.850 回答