3

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.

Windowlicker
  • 498
  • 11
  • 18

1 Answers1

5

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.

Albert Tugushev
  • 1,504
  • 13
  • 25
  • 1
    Thanks. Valid point as the respective `pyproject.toml` originates from using poetry, thus having dependencies listed in `[tool.poetry.dependencies]`. That doesn't fit pip-tools, which makes sense. – Windowlicker Feb 22 '23 at 22:00
  • 1
    For completion: The error was in the `[project]` section of `pyproject.toml` missing a `version` entry, which seems to be mandatory. Using [validate-pyproject](https://pypi.org/project/validate-pyproject/) helps pointing this out. – Windowlicker Feb 23 '23 at 10:41
  • I have started from the very minimal version and extending one line at a time until figure out what line causes the problem. https://stackoverflow.com/questions/64150719/how-to-write-a-minimally-working-pyproject-toml-file-that-can-install-packages – outoftime Mar 06 '23 at 14:02