其他分享
首页 > 其他分享> > ImportError: DLL load failed while importing _multiarray_umath: The specified module could not be fo

ImportError: DLL load failed while importing _multiarray_umath: The specified module could not be fo

作者:互联网

E:\Eprogramfiles\Anaconda3\python.exe E:/beats.py
E:\Eprogramfiles\Anaconda3\lib\site-packages\numpy\__init__.py:148: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
  from . import _distributor_init
Traceback (most recent call last):
  File "E:\Eprogramfiles\Anaconda3\lib\site-packages\numpy\core\__init__.py", line 22, in <module>
    from . import multiarray
  File "E:\Eprogramfiles\Anaconda3\lib\site-packages\numpy\core\multiarray.py", line 12, in <module>
    from . import overrides
  File "E:\Eprogramfiles\Anaconda3\lib\site-packages\numpy\core\overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ImportError: DLL load failed while importing _multiarray_umath: The specified module could not be found.


 

=====================================================

Solution:

It got resloved once i upgraded the numpy from 1.15.4 to 1.16.1.

If you're using pip: pip install numpy --upgrade

Numpy that came with Anaconda3 is of version 1.15.4. so i upgraded and it worked.

 

if still persists due to an already downloaded numpy, clear pip cache with pip cache purge

 
REF
https://stackoverflow.com/questions/54665842/when-importing-tensorflow-i-get-the-following-error-no-module-named-numpy-cor

=====================================================

环境变量的问题

import os
print("PYTHONPATH:", os.environ.get('PYTHONPATH'))
print("PATH:", os.environ.get('PATH'))

=====================================================

 Traceback (most recent call last):
  File "E:/_beats.py", line 5, in <module>
    from nbeats_keras.model import NBeatsNet as NBeatsKeras
  File "E:\Eprogramfiles\Anaconda3\lib\site-packages\nbeats_keras\model.py", line 2, in <module>
    import tensorflow as tf
  File "E:\Eprogramfiles\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "E:\Eprogramfiles\Anaconda3\lib\site-packages\tensorflow\python\__init__.py", line 47, in <module>
    from tensorflow.python import keras
  File "E:\Eprogramfiles\Anaconda3\lib\site-packages\tensorflow\python\keras\__init__.py", line 27, in <module>
    from tensorflow.python.keras import models
  File "E:\Eprogramfiles\Anaconda3\lib\site-packages\tensorflow\python\keras\models.py", line 26, in <module>
    from tensorflow.python.keras.engine import functional
  File "E:\Eprogramfiles\Anaconda3\lib\site-packages\tensorflow\python\keras\engine\functional.py", line 38, in <module>
    from tensorflow.python.keras.engine import training as training_lib
  File "E:\Eprogramfiles\Anaconda3\lib\site-packages\tensorflow\python\keras\engine\training.py", line 50, in <module>
    from tensorflow.python.keras.engine import data_adapter
  File "E:\Eprogramfiles\Anaconda3\lib\site-packages\tensorflow\python\keras\engine\data_adapter.py", line 56, in <module>
    from scipy import sparse as scipy_sparse  # pylint: disable=g-import-not-at-top
  File "E:\Eprogramfiles\Anaconda3\lib\site-packages\scipy\__init__.py", line 136, in <module>
    from . import _distributor_init
  File "E:\Eprogramfiles\Anaconda3\lib\site-packages\scipy\_distributor_init.py", line 59, in <module>
    WinDLL(os.path.abspath(filename))
  File "E:\Eprogramfiles\Anaconda3\lib\ctypes\__init__.py", line 381, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module  Anaconda3\lib\site-packages\scipy\.libs\libbanded5x.TNNMG3IXHGJK7NIBT5J6YPEO5XWTOQAJ.gfortran-win_amd64.dll' (or one of its dependencies). Try using the full path with constructor syntax.

Process finished with exit code 1

 

pip install scipy


conda install scipy=1.6.2



标签:load,lib,Anaconda3,ImportError,Eprogramfiles,could,py,import,packages
来源: https://www.cnblogs.com/emanlee/p/16227237.html