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


    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'))

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

    import scipy

     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


    【有效】设置一个环境变量 CONDA_DLL_SEARCH_MODIFICATION_ENABLE 值为1(仅对Conda有效)


  • 相关阅读:
    定时任务框架APScheduler学习详解
    Python list 和 str 互转
    python多个变量赋值
    python数据类型转换
    jquery datetimepicker 配置参数
    c#判断是否为合法的email地址
    SQL的四种连接-左外连接、右外连接、内连接、全连接
    SQL表连接查询(inner join、full join、left join、right join)
    简单的日期转换
    递归
  • 原文地址:https://www.cnblogs.com/emanlee/p/16227237.html
Copyright © 2020-2023  润新知