pip-tools 的干净设置不会编译非常基本的 pyproject.toml

Win*_*ker 5 python pip-tools

使用全新的pip-tools设置总是会导致错误Backend subprocess exited

pyproject.toml

[project]
dependencies = [
  'openpyxl >= 3.0.9, < 4',
]
Run Code Online (Sandbox Code Playgroud)

在仅包含上述 pyproject.toml 的空目录中运行 pip-tools:

% python -m venv .venv
% source .venv/bin/activate
% python -m pip install pip-tools
% pip-compile -v -o requirements.txt --resolver=backtracking pyproject.toml
Creating venv isolated environment...
Installing packages in isolated environment... (setuptools >= 40.8.0, wheel)
Getting build dependencies for wheel...
Backend subprocess exited when trying to invoke get_requires_for_build_wheel
Failed to parse .../pyproject.toml
Run Code Online (Sandbox Code Playgroud)

没有requirements.txt被创建。

对于这里可能缺少的内容的想法表示赞赏。

Alb*_*hev 9

你的pyproject.toml很可能是无效的,尝试一下pip install -e .,你会看到详细的解释。目前,pip-tools 无法显示良好的错误消息,但工作正在进行中