wide-journalist-72152
02/03/2024, 6:00 PMpants generate-lockfiles command met an exception:
10:41:41.12 [ERROR] 1 Exception encountered:
Engine traceback:
in `generate-lockfiles` goal
ProcessExecutionFailure: Process 'Generate lockfile for python-default' failed with exit code 1.
stdout:
stderr:
Invalid specifier: 'CPython>=3.11.*'
I couldn't find any place that CPython was being specified in my requirements or Pant configuration, so I was initially stumped.
Then I looked at my interpreter_contraints in pants.toml and saw I had this:
interpreter_constraints = [">=3.11.*"]
I realized that I wanted to pin that to an exact minor version of Python thus:
interpreter_constraints = ["==3.11.*"]
... and when I did so it resolved the issue with generate-lockfiles. Hurray!
Alas, I did find the solution more or less by accident, so if this prompts anyone to think about a better error message it probably would be helpful.happy-kitchen-89482
02/03/2024, 6:13 PM