为什么pip搜索无法找到某些包,而它们可以通过pip安装来安装

2024-05-28 23:36:08 发布

您现在位置:Python中文网/ 问答频道 /正文

为什么pip search找不到某些包(例如,html5lib),而它们可以通过pip 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...

Tags: installpiptoinpyforsearchhtml
1条回答
网友
1楼 · 发布于 2024-05-28 23:36:08

html5lib是hidden in pypi.python.org,因此它不会显示在搜索结果中,但仍然可以直接访问:

    "_pypi_hidden": true, 

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

  • 0.999999/1.0b8
  • 0.999999/1.0b7
  • […]
  • 0.99库从1.0b3起没有变化;作为0.99发布,因为pip已经从1.4改变了行为,以避免按照pep440安装预发布版本。
  • 1.0立方米
  • […]

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

相关问题 更多 >

    热门问题