Hey all, getting this error when trying to generat...
# general
r
Hey all, getting this error when trying to generate a Python lockfile:
Copy code
ERROR: Could not find a version that satisfies the requirement pandas==1.5.2
ERROR: No matching distribution found for pandas==1.5.2
When I remove that dependency from my
requirements.txt
the lockfile generation works. This version of pandas also definitely exists: https://pypi.org/project/pandas/#history. I have https://pypi.org/simple/ specified in my indexes field under
[python-repos]
. Also weird is that there are other dependencies that depend on pandas and it is able to locate a much older version, but there's no requirement that should prevent installation of this specific version.
p
It is saying it can't find that version that also matches all the other constraints. There is probably an interpreter constraint or a version constraint on another dep that is making v1.5.2 be marked "incompatible".
p
this kind of error is in most case due to to wide range of python interpreter constraints defined in pants.toml https://www.pantsbuild.org/docs/python-interpreter-compatibility so for example, if you allow python 3.6, pants will try to find a version/wheel (aka distribution) for pandas that satisfies both the interpreter constraints (3.6) and the pandas version (1.5.2) and if that fails, that is the error you will be getting.
e
Yeah, exactly, This is
*Requires:* Python >=3.8
@ripe-gigabyte-88964 if you re-run with
-ldebug
we can see the command line Pants uses to try to create the lock file. That will include what it thinks the
--interpreter-constraint
is.
🙏 1
~guaranteed
>=3.7,<4
p
r
Thanks all, never would've figured that out 😅