https://pantsbuild.org/ logo
#general
Title
# general
p

purple-umbrella-89891

09/22/2022, 1:06 PM
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

happy-kitchen-89482

09/22/2022, 3:18 PM
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

purple-umbrella-89891

09/22/2022, 6:22 PM
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

happy-kitchen-89482

09/22/2022, 8:59 PM
aha, makes sense
Yep, a minimal repro in the form of a github repo is always appreciated! 🙂
6 Views