Closed
Description
Steps to reproduce:
- Use pyenv to install python 3.12.0b2.
- Clone numpy v1.25.0rc1.
pip install -r requirements
- Uncomment
build-backend = "mesonpy"
. pip install --no-build-isolation .
.
The OS I use is Archlinux, and openblas
and cblas
are installed. In case it is relevant, openblas.pc
is present in /usr/lib/pkgconfig/
.
Error message:
Traceback (most recent call last):
File "/home/paro/.pyenv/versions/3.12.0b2/lib/python3.12/site-packages/numpy/core/__init__.py", line 23, in <module>
from . import multiarray
File "/home/paro/.pyenv/versions/3.12.0b2/lib/python3.12/site-packages/numpy/core/multiarray.py", line 10, in <module>
from . import overrides
File "/home/paro/.pyenv/versions/3.12.0b2/lib/python3.12/site-packages/numpy/core/overrides.py", line 8, in <module>
from numpy.core._multiarray_umath import (
ImportError: /home/paro/.pyenv/versions/3.12.0b2/lib/python3.12/site-packages/numpy/core/_multiarray_umath.cpython-312-x86_64-linux-gnu.so: undefined symbol: cblas_sgemm
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/paro/.pyenv/versions/3.12.0b2/lib/python3.12/site-packages/numpy/__init__.py", line 125, in <module>
from numpy.__config__ import show as show_config
File "/home/paro/.pyenv/versions/3.12.0b2/lib/python3.12/site-packages/numpy/__config__.py", line 4, in <module>
from numpy.core._multiarray_umath import (
File "/home/paro/.pyenv/versions/3.12.0b2/lib/python3.12/site-packages/numpy/core/__init__.py", line 49, 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.12 from "/home/paro/.pyenv/versions/3.12.0b2/bin/python"
* The NumPy version is: "1.25.0rc1"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: /home/paro/.pyenv/versions/3.12.0b2/lib/python3.12/site-packages/numpy/core/_multiarray_umath.cpython-312-x86_64-linux-gnu.so: undefined symbol: cblas_sgemm
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/paro/.pyenv/versions/3.12.0b2/lib/python3.12/site-packages/numpy/__init__.py", line 130, 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.
Additional information:
ldd
shows that the compiled library is not linking against BLAS at all.
~ $ ldd /home/paro/.pyenv/versions/3.12.0b2/lib/python3.12/site-packages/numpy/core/_multiarray_umath.cpython-312-x86_64-linux-gnu.so
linux-vdso.so.1 (0x00007ffcdc3e1000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f0dfa084000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f0dfa05f000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f0df9e75000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f0dfa59c000)