When generating a lockfile, I'm getting an error b...
# general
p
When generating a lockfile, I'm getting an error because pants seems to add a requirement
setuptools<63.0.0,>=62.3.2
even though I haven't specified any version. This clashes with a package (
numba>=0.56.1
) that requires
setuptools<60
for some reason. Is there a way around this? I tried setting
PANTS_SETUPTOOLS_VERSION="setuptools<60"
but it had no effect. This is the error I'm getting:
Copy code
$ ./pants --no-watch-filesystem --no-pantsd generate-lockfiles --resolve=python-default
14:31:15.17 [INFO] Completed: Generate lockfile for python-default
14:31:15.17 [ERROR] 1 Exception encountered:

  ProcessExecutionFailure: Process 'Generate lockfile for python-default' failed with exit code 1.
stdout:

stderr:
ERROR: Cannot install setuptools<60 and setuptools<63.0.0 and >=62.3.2 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit <https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies>
... very long pex command...

 The conflict is caused by:
     The user requested setuptools<63.0.0 and >=62.3.2
     numba 0.56.2 depends on setuptools<60
Any ideas how to solve this? Edit: This is on pants 2.12.0
h
I don’t think Pants should be adding a setuptools requirement to your own lockfile, so this is weird
What are the inputs to that lockfile? a requirements.txt?
p
Hi Benjy, thanks for the reply! I've made some changes to the repository and no longer have the problem. I suspect that more dependencies were being injected by a
python_requirements
or
poetry_requirements
at another place besides the root of the repo, causing the problem. I'll get back to you if I can reproduce it with a minimal example.
h
aha, makes sense
Yep, a minimal repro in the form of a github repo is always appreciated! 🙂