TensorFlow导入错误:DLL加载失败,错误代码为-1073741795

时间:2018-12-15 04:43:24

标签: python python-3.x tensorflow keras

我正在使用Python 3.6.2(64位)。安装Tensorflow没有问题。但是现在当我尝试导入它时。我收到以下错误。查看了建议的链接(https://www.tensorflow.org/install/errors),但该错误代码和消息尚未包含在任何地方。我正在使用Windows 7。

Using TensorFlow backend.
Traceback (most recent call last):
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: DLL load failed with error code -1073741795

在处理上述异常期间,发生了另一个异常:

Traceback (most recent call last):
  File "C:\Users\davm5\Local Disk (D)\Documents\PhD\Kaba Work\NN.py", line 3, in <module>
    import keras
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\__init__.py", line 3, in <module>
    from . import utils
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\utils\__init__.py", line 6, in <module>
    from . import conv_utils
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\utils\conv_utils.py", line 9, in <module>
    from .. import backend as K
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\backend\__init__.py", line 89, in <module>
    from .tensorflow_backend import *
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\backend\tensorflow_backend.py", line 5, in <module>
    import tensorflow as tf
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\davm5\AppData\Local\Programs\Python\Python36\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: DLL load failed with error code -1073741795

无法加载本机TensorFlow运行时。

请参见https://www.tensorflow.org/install/errors

出于某些常见原因和解决方案。包括整个堆栈跟踪 寻求帮助时,此错误消息上方。`

0 个答案:

没有答案