我正在尝试运行wavenet实现(使用tensorflow + librosa)。但是,我一直遇到错误"无法导入名称' NUMPY_MKL'"。
我已经安装了tensorflow,numpy + mk1,scipy和librosa。 Tensorflow本身加载正常,但是当我运行使用librosa的wavenet实现时会触发错误。
我的规格/细节: Python 3.5.2 Numpy + MK1(numpy-1.13.1 + mkl-cp35-cp35m-win_amd64.whl) Scipy(scipy-0.19.1-cp35-cp35m-win_amd64.whl) Windows 10 x64 Nvidia CUDA v8.0(cudnn 5.1)
希望你能提供帮助。完整的错误日志如下:
Traceback (most recent call last):
File "train.py", line 20, in <module>
from wavenet import WaveNetModel, AudioReader, optimizer_factory
File "D:\musicAI\wavenet\__init__.py", line 2, in <module>
from .audio_reader import AudioReader
File "D:\musicAI\wavenet\audio_reader.py", line 7, in <module>
import librosa
File "C:\Python35\lib\site-packages\librosa\__init__.py", line 12, in <module>
from . import core
File "C:\Python35\lib\site-packages\librosa\core\__init__.py", line 108, in <module>
from .time_frequency import * # pylint: disable=wildcard-import
File "C:\Python35\lib\site-packages\librosa\core\time_frequency.py", line 10, in <module>
from ..util.exceptions import ParameterError
File "C:\Python35\lib\site-packages\librosa\util\__init__.py", line 67, in <module>
from .utils import * # pylint: disable=wildcard-import
File "C:\Python35\lib\site-packages\librosa\util\utils.py", line 5, in <module>
import scipy.ndimage
File "C:\Python35\lib\site-packages\scipy\__init__.py", line 61, in <module>
from numpy._distributor_init import NUMPY_MKL # requires numpy+mkl
ImportError: cannot import name 'NUMPY_MKL'
答案 0 :(得分:1)
通过完全卸载numpy + mk1进行管理以解决此问题,然后重新安装。
我以前做过:
pip install --ignore-install path\numpy.whl
这样做是为了让它运转起来:
pip uninstall numpy # this removes the existing copy
pip install path\numpy.whl # this install the numpy+mk1 from local .whl file