Search code examples
pythonpip-tools

Clean setup of pip-tools doesn't compile very basic pyproject.toml


Using a completely new pip-tools setup always results in a Backend subprocess exited error.

pyproject.toml:

[project]
dependencies = [
  'openpyxl >= 3.0.9, < 4',
]

Running pip-tools in an empty directory that only contains the above pyproject.toml:

% 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

No requirements.txt gets created.

Ideas on what might be missing here are appreciated.


Solution

  • Your pyproject.toml most likely is invalid, try pip install -e . and you'll see a detailed explanation. For now, pip-tools can't show a nice error message, but work is in progress.