为什么 pip freeze returns some "gibberish" 而不是 package==VERSION?

why pip freeze returns some "gibberish" instead of package==VERSION?

这是我所做的:

❯ pip freeze
aiohttp @ file:///Users/aiven/Library/Caches/pypoetry/artifacts/50/32/0b/b64b02b6cefa4c089d84ab9edf6f0d960ca26cfbe57fe0e693a00912da/aiohttp-3.6.2-py3-none-any.whl
async-timeout @ file:///Users/aiven/Library/Caches/pypoetry/artifacts/0d/5d/3e/630122e534c1b25e36c3142597c4b0b2e9d3f2e0a9cea9f10ac219f9a7/async_timeout-3.0.1-py3-none-any.whl
attrs @ file:///Users/aiven/Library/Caches/pypoetry/artifacts/7f/e7/44/32ca3c400bb4d8a2f1a91d1d3f22bbaee2f4727a037aad898fbf5d36ce/attrs-20.2.0-py2.py3-none-any.whl
chardet @ file:///Users/aiven/Library/Caches/pypoetry/artifacts/c2/02/35/0d93b80c730b360c5e3d9bdc1b8d1929dbd784ffa8e3db025c14c045e4/chardet-3.0.4-py2.py3-none-any.whl
...

pip 版本:

❯ pip -V
pip 20.2.3 from /Users/aiven/projects/foobar/venv/lib/python3.8/site-packages/pip (python 3.8)

我期待这样的事情:

> pip freeze
foo==1.1.1
bar==0.2.1

pip freeze -h 不是很有帮助...

对于上下文:我使用 poetry.

将软件包安装到 virtualenv 中

这似乎来自支持 PEP 610. In particular refer to the Freezing an environment section 的更改。 “冻结”的概念已经扩展到包括保留直接 url 直接来源安装的包的来源。

诗歌,同1.1.0又推出了new installer that now handles discovery and download of artifacts for dependencies. This is different to the behaviour in 1.0.10 which simply let pip handle discover and download of required artifacts (wheels). This means that, now packages are installed using direct URL origins. This causes pip freeze to use direct reference format as specified in PEP 508(如:package @ file://../package.whl)。对于那些感兴趣的人,有问题的 url 将保存在虚拟环境站点目录中的 <package>-<version>.dist-info/direct_url.json 中。

您可以使用以下命令获得旧格式输出(不确定将来是否会更改)。

pip --disable-pip-version-check list --format=freeze