Description
I test num-1.19.4 and python3.8 in arm platform,but I import numpy,it shows error as follow:
Python 3.8.4 (default, Nov 26 2020, 20:39:17)
[GCC 5.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import numpy
/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/core/_multiarray_umath.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import sys, pkg_resources, imp
/tmp/sda1/Python3/bin/python3.8: symbol 'npy_clear_floatstatus_barrier': can't resolve symbol
/tmp/sda1/Python3/bin/python3.8: symbol 'npy_get_floatstatus_barrier': can't resolve symbol
Traceback (most recent call last):
File "/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/core/init.py", line 22, in
from . import multiarray
File "/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/core/multiarray.py", line 12, in
from . import overrides
File "/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/core/overrides.py", line 7, in
from numpy.core._multiarray_umath import (
File "/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/core/_multiarray_umath.py", line 7, in
bootstrap()
File "/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/core/_multiarray_umath.py", line 6, in bootstrap
imp.load_dynamic(name,file)
File "/tmp/sda1/Python3/lib/python3.8/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: unknown dlopen() error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/init.py", line 140, in
from . import core
File "/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/core/init.py", line 48, in
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.8 from "/tmp/sda1/Python3/bin/python3.8"
- The NumPy version is: "1.19.4"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
I see the https://numpy.org/devdocs/user/troubleshooting-importerror.html
but still stucked. hope numpy team to help.
Steps to reproduce:
Error message:
/tmp/sda1/Python3/bin/python3.8: symbol 'npy_clear_floatstatus_barrier': can't resolve symbol
/tmp/sda1/Python3/bin/python3.8: symbol 'npy_get_floatstatus_barrier': can't resolve symbol
I check the npy_get_floatstatus_barrier is in the .so;
admin@cmiot:/tmp/sda1/Python3/lib/python3.8/site-packages/numpy/core# grep -rsn
npy_get_floatstatus_barrier .
./include/numpy/npy_math.h:576:int npy_get_floatstatus_barrier(char*);
./lib/libnpymath.a:25255:npy_get_floatstatus_barrier
./lib/libnpymath.a:27039:npy_get_floatstatus_barrier
./_multiarray_tests.cpython-38-i386-linux-gnu.so:7437:npy_get_floatstatus_barrier
./_multiarray_tests.cpython-38-i386-linux-gnu.so:85216:npy_get_floatstatus_barrier
./_multiarray_tests.cpython-38-i386-linux-gnu.so:176223:npy_get_floatstatus_barrier
./_multiarray_umath.cpython-38-i386-linux-gnu.so:14860:npy_get_floatstatus_barrier
./_multiarray_umath.cpython-38-i386-linux-gnu.so:1492164:npy_get_floatstatus_barrier
./_multiarray_umath.cpython-38-i386-linux-gnu.so:3529524:npy_get_floatstatus_barrier
the PATH and PYTHONPATH is
PATH=/tmp/sda1/Python3/bin
PYTHONPATH=/tmp/sda1/Python3/lib/python3.8