-
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
Fix ModuleNotFoundError: No module named 'numpy' on build #1979
Fix ModuleNotFoundError: No module named 'numpy' on build #1979
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order for this to work correctly, we need to use numpy >= 1.25
to ensure that we build against an ABI-compatible version of NumPy (otherwise will get ABI mismatch errors at import time)
- see discussion here: Status of the project and foreseeable future ? scipy/oldest-supported-numpy#76
- and in README for this deprecated package
I believe we also need to make it conditional for python 3.8 like this:
Line 36 in e89521b
"numpy==1.17.*,<2.0 ; python_version == '3.8' and platform_machine != 'aarch64'", |
so the build-system
requires
would look like:
"numpy==1.17.*,<2.0 ; python_version == '3.8' and platform_machine != 'aarch64'",
"numpy>=1.25 ; python_version >= '3.9"
cc @sgillies in case any comments, since you worked on cleaning up pyproject deps here in https://github.com/TileDB-Inc/TileDB-Py/pull/1963/files |
It seems like that PR broke the build procedure. Maybe the problem is the removal of:
But just adding |
I'm sorry about the breakage. Maybe we can work on having our tests build and install a wheel instead of using I'll check this out. We may want to start requiring numpy 2 in pyproject.toml for forward compatibility. |
@kounelisagis I'm on the dev branch, commit 8355035, and if I add numpy and cmake to pyproject.toml
Then I get an sdist and a wheel if I run
cibuildwheel invokes
I think that should be all that's needed. @ihnorton's comments about Python specific numpy versions look correct. |
I don't think there was breakage in any release, slightly unclear to me what that's referring to - no worries.
We do run tests on the wheels with cibuildwheel (but that probably won't catch a numpy ABI mismatch). |
Co-authored-by: Isaiah Norton <[email protected]>
The following error occurs when trying to build. Fixed by adding
numpy
in build dependencies.Also update
HISTORY
.