Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Description
Feature or enhancement
Proposal:
Relatively regularly we get issues e.g. in NumPy because of incompatible extension module builds. (NumPy is often the first C-extension module someone loads.)
We have a long spammy message, but it includes the original error from Python:
Original error was: No module named 'numpy._core._multiarray_umath'
In this case, I had renamed the module to make it an incorrect build:
mv <snip>/lib/python3.11/site-packages/numpy/_core/_multiarray_umath.cpython-311-darwin.so <snip>/lib/python3.11/site-packages/numpy/_core/_multiarray_umath.cpython-312-darwin.so
I think it would be great if the error could include something like:
Binary module was build for a different Python version/system: Python version is cpython-312 rather than cpython-311) or (architecture x86 but expected arm64)
That way it is far more obvious that the build (or Python version) is wrong.
(Even just listing the files found and the expected file name would be good.)
I am not sure that is desirable for Python, since you would have to see if any file looks similar to the expected module when formatting the error. So in that case I may think about doing this in NumPy (since we know for a fact the file must be there somewhere).
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
I didn't find a discussion, this seems very slightly in a similar direction, but not about an incompatible build#69841.