msaf icon indicating copy to clipboard operation
msaf copied to clipboard

ImportError: numpy.core.multiarray failed to import

Open MoroZing opened this issue 3 years ago • 3 comments

Hello, I try to run run_msaf.py, but an error occured, here is the traceback information:

ModuleNotFoundError: No module named 'numpy.core._multiarray_umath' Traceback (most recent call last): File "run_msaf.py", line 12, in import msaf File "/sge_g560v5c/l00586077/anaconda3/envs/seg/lib/python3.8/site-packages/msaf/init.py", line 20, in from . import features File "/sge_g560v5c/l00586077/anaconda3/envs/seg/lib/python3.8/site-packages/msaf/features.py", line 19, in import librosa File "/sge_g560v5c/l00586077/anaconda3/envs/seg/lib/python3.8/site-packages/librosa/init.py", line 12, in from . import core File "/sge_g560v5c/l00586077/anaconda3/envs/seg/lib/python3.8/site-packages/librosa/core/init.py", line 104, in from .time_frequency import * # pylint: disable=wildcard-import File "/sge_g560v5c/l00586077/anaconda3/envs/seg/lib/python3.8/site-packages/librosa/core/time_frequency.py", line 10, in from ..util.exceptions import ParameterError File "/sge_g560v5c/l00586077/anaconda3/envs/seg/lib/python3.8/site-packages/librosa/util/init.py", line 67, in from .utils import * # pylint: disable=wildcard-import File "/sge_g560v5c/l00586077/anaconda3/envs/seg/lib/python3.8/site-packages/librosa/util/utils.py", line 5, in import scipy.ndimage File "/sge_g560v5c/l00586077/anaconda3/envs/seg/lib/python3.8/site-packages/scipy/ndimage/init.py", line 161, in from .filters import * File "/sge_g560v5c/l00586077/anaconda3/envs/seg/lib/python3.8/site-packages/scipy/ndimage/filters.py", line 37, in from . import _nd_image ImportError: numpy.core.multiarray failed to import

hope for your help, thank you

MoroZing avatar Dec 07 '21 12:12 MoroZing

Hi, seems like your numpy version is not compatible with msaf. According to this, you may be able to solve it by doing:

pip install numpy==1.19.3

Hope this helps!

urinieto avatar Dec 08 '21 03:12 urinieto

I tried that way, but seems doesn't work, my numpy version now is 1.19.3

MoroZing avatar Dec 08 '21 06:12 MoroZing

sorry, I changed my python version from 3.8 to 3.6, then the same problem as theme 113, and to solve this problem, I changed the version of numpy&librosa, seems that these packages have some compatible problem thank you so much for help

MoroZing avatar Dec 08 '21 08:12 MoroZing