-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
BUG: Error when importing NumPy main (No module named 'numpy.core._multiarray_umath') #20335
Comments
Can you add the full build log @asmeurer? |
The main error seems to be My guess would be that the compiler used to compile C++ code is still
Other errors:
That's pretty clear, this machine target is not supported (but
That's a consequence of the above. The correct approach here would be to (use xsimd) make sure these are only used when the correct arch is available. Hope it helps. |
@asmeurer can you describe the minimal steps I should use to reproduce locally, I'd be happy to provide patches. |
I did link the build log in the OP. The minimal steps are just do an inplace build from a fresh clone, as I noted. I'm happy to provide additional information on my environment (compiler versions or whatever), but you'll have to tell me what you want to know because I don't really know enough about the NumPy build process to guess know what is relevant. |
I saw that in the wheel builds, but it didn't abort anything. Maybe because they were release builds? Are you building on a mac? I'm curious about the clang version. |
This is on Mac. I'm assuming these are the correct commands for the clang version
Apparently I have it installed via conda-forge (but I have no idea what the relevant conda packages are). |
Just tried building in another environment using the system clang and it worked.
|
Interesting. My understanding is that apple clang versioning differs from non-apple versioning so I don't know how the versions actually compare. |
I'm having a look at this, and how the build On Linux I see only a couple of warnings when building with conda compilers. One is about the compiler not being detected - not critical here (because the compiler is a GCC one), but should be fixed:
Full build log - Linux, conda numpy-dev env:
(macOS to follow, posting from other machine) |
On macOS ( Full build log - macOS arm64, conda-forge numpy-env:
|
|
@asmeurer, could you try #20353? It should confirm my #20344 (comment), we still need another patch for testing c++ compilation before the build starts. |
This should give clear error messages now when the C++ is missing or somehow broken. |
Otherwise it gets used for C source too, which is either useless or invalid (for clang(family compiler) Fix numpy#20335
Describe the issue:
In NumPy main, when I do an inplace build, I can no longer import NumPy. I get
I bisected it to 2ae7aeb.
There are several errors in the build log, which I've included here https://gist.github.com/asmeurer/40754d1a4429449e1d558e003caa1860.
There seem to be some issues with the build scripts with C++. Perhaps they were never tested with clang?
This is currently blocking my ability to properly test my PR #20066.
Reproduce the code example:
Error message:
No response
NumPy/Python version information:
This is the latest NumPy main. I am using Python 3.9.2, on macOS.
The text was updated successfully, but these errors were encountered: