You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.10.13 (main, Oct 5 2023, 16:21:31) [Clang 13.0.0 ] on openbsd7
Type "help", "copyright", "credits" or "license"for more information.
>>> import numpy
python:/home/david/.local/lib/python3.10/site-packages/numpy/core/_multiarray_umath.cpython-310.so: undefined symbol 'strtold_l'
Traceback (most recent call last):
File "/home/david/.local/lib/python3.10/site-packages/numpy/core/__init__.py", line 24, in<module>
from . import multiarray
File "/home/david/.local/lib/python3.10/site-packages/numpy/core/multiarray.py", line 10, in<module>
from . import overrides
File "/home/david/.local/lib/python3.10/site-packages/numpy/core/overrides.py", line 8, in<module>
from numpy.core._multiarray_umath import (
ImportError: Cannot load specified object
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/david/.local/lib/python3.10/site-packages/numpy/__init__.py", line 130, in<module>
from numpy.__config__ import show as show_config
File "/home/david/.local/lib/python3.10/site-packages/numpy/__config__.py", line 4, in<module>
from numpy.core._multiarray_umath import (
File "/home/david/.local/lib/python3.10/site-packages/numpy/core/__init__.py", line 50, in<module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.10 from "/usr/local/bin/python"* The NumPy version is: "1.26.1"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: Cannot load specified object
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
File "/home/david/.local/lib/python3.10/site-packages/numpy/__init__.py", line 135, in<module>
raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.
>>>
Sorry about that @DavidAlphaFox. This issue was fixed in gh-24979 recently, but that fix was not included in the 1.26.1 release. If you could apply that fix and confirm it works for you, that would be great. We'll include it in 1.26.2 then.
@rgommers I can success build the numpy with main branch and import numpy without errors.
And on OpenBSD it requires extra LDFLAGS="-L/usr/local/include -lcblas" to link the libclabs.so under the /usr/local/lib.
Thanks for confirming @DavidAlphaFox. The fix is being backported in gh-25049, so it'll land in 1.26.2. I'll close this issue, because we have gh-25041 for the -lcblas part already.
Steps to reproduce:
in the python's repl
import numpy
Error message:
Additional information:
link with -L/usr/local/lib -lcblas
The text was updated successfully, but these errors were encountered: