-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Module API version issue when numpy is installed from source and numpy version is older than oldest-supported-numpy
#67
Comments
@lesteve thanks for bringing this up. There's indeed a couple of "don't do that" things here, and limitations of Python packaging:
However, the biggest issue here is that the wheels for scipy, scikit-learn or other users of oldest-supported-numpy do not contain the correct lower bound on the runtime version of numpy that they need. This is and always has been wrong, mainly because |
Hi, I have been impacted by this as well, on aarch64, actually, I think it's maybe not the first time but I simply spotted it this time : basically, pycuda and pycocotools are using oldest-supported-numpy in their pyproject.toml build-dependencies. and given they only provide source/tar.gz I believe this is impacting eventually lot of people. I had to patch them with : - "oldest-supported-numpy",
+ "numpy", in their respective |
@gst that sounds like a different problem. If you want to build against the latest rather than the oldest possible version of numpy, then you should turn off build isolation ( |
ok --no-build-isolation makes the job.. if you have already the correct build dependencies installed though. hmm. --skip-dependency-check is not really an option IMHO. maybe this should be reported to pycuda and pycocotools repositories then, I don't know. |
I agree with @gst , |
It's an extremely limited feature, for multiple reasons; why it cannot apply here (no static metadata for C API/ABI constraints basically) has been elaborated on before. There's nothing that can be done until
There's an additional conceptual issue here. |
I'm going to close this as wontfix - this isn't really actionable. The original issue with numpy 1.22 is unsupported I'd say, and user error / bad action from Fedora.
I'd say that is also a "don't do that situation". I understand the problem, but there is no real solution other than teaching people to not mix package managers. SciPy doesn't use |
This is a bit of a edge case, but this would be good to have your thoughts on it, since this affects all the packages that uses
oldest-supported-numpy
. Maybe there is not much we can do to improve the situation.Currently if you have Python 3.11, install numpy 1.22 from source, and install a wheel for scipy (or any package that uses
oldest-supported-numpy
) you will get an error at import time about ABI version mismatch.One way to reproduce:
Output:
In some sense this is slightly weird to do that since numpy 1.23 is the first version that officially supports Python 3.11. At the same time, the user experience is not great.
Also some distributions may package numpy 1.22 for Python 3.11, e.g. Fedora, and you will end up in a similar situation if you install a scipy wheel on top of your package manager numpy. This actually came up in the scikit-learn repo, see scikit-learn/scikit-learn#25159 for more details.
The text was updated successfully, but these errors were encountered: