强制诗歌尊重 requirements.txt 中的版本

Force poetry to respect the versions in requirements.txt

以下是在requirements.txt中:

requirements.txt:packaging==20.9

但是在做了 poetry add [some unrelated pkg] 我们现在有 poetry.lock:

   {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"},

这对我们不起作用。怎样才能得到诗来听requirements.txt?

How can I get poetry to listen to the requirements.txt?

你不能。如果您使用诗歌,请不要使用 requirements.txt 将您的依赖项添加到 pyproject.toml