-
-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDM complains when using 3.12 with requires-python >=3.10 #2347
Comments
I've encoutered this problem several times recently, and it seems to be caused by numpy 1.26 pinning its maximum python version. |
Yes. As hinted in the error message, you have to add the upper bound to The example you gave should work: dependencies = [
"numpy>=1.26",
"transformers",
"pydantic>=2.4.2",
"defopt",
]
requires-python = ">=3.10,<3.13" I suspect you didn't save before running |
In fact, version 2.10.0 introduced a new warning message that explicitly tells you how to fix it. It should have been shown but I don't know why it didn't appear in the output you pasted. |
I think Numpy applied this pin via a release branch - it doesn't appear in the |
So numpy 1.26.2 will not complain it any more. Thanks for the information! |
Make sure you run commands with
-v
flag before pasting the output.Steps to reproduce
I had a numpy dependency which wouldn't install, it turned out to be a 3.12 requirement to use numpy>=1.26 (see).
When I installed a package with the following TOML sections
I got the error:
Actual behavior
Installation fails.
Expected behavior
I presume it should be able to resolve the Python version without pinning the range like this?
If I have 3.12 and the Python version TOML config says
>=3.10
then I would expect it to install for 3.12 without failing.Environment Information
pdm info && pdm info --env
The text was updated successfully, but these errors were encountered: