python-为什么pip搜索找不到某些程序包,而无论如何仍可以通过pip install安装它们
作者:互联网
为什么pip搜索找不到某些程序包(例如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...
解决方法:
html5lib是hidden in pypi.python.org,因此它不会显示在搜索结果中,但仍可以直接访问:
"_pypi_hidden": true,
我不知道为什么要隐藏该软件包(这只是数据库字段中的一个标志),但我强烈怀疑它是由该软件包的奇怪版本控制系统(最近的版本)引起的:
> 0.9999999 / 1.0b8
> 0.999999 / 1.0b7
> […]
> 0.99从1.0b3起没有库更改;由于pip的行为已从1.4更改为0.99,从而避免按照PEP 440安装预发行版本.
> 1.0b3
> […]
解决方法是发布一个适当的1.0版本,该版本将显示在beta版本上方,并希望重置隐藏标志.
标签:pypi,html5lib,python,pip 来源: https://codeday.me/bug/20191118/2031986.html