Tag Archives: TensorflowImportError: DLL load failed:

[Solved] Tensorflow:ImportError: DLL load failed: The specified module cannot be found Failed to load the native TensorFlow runtime

Configuration: Windows 10

python3.6

CUDA 10.1

CUDNN 7.6.0

tensorflow 1.12

Process: Import tensorflow as TF , and then report an error:

Traceback (most recent call last):

  File "<ipython-input-6-64156d691fe5>", line 1, in <module>
    import tensorflow as tf

  File "C:\Users\HonorVan\AppData\Roaming\Python\Python36\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import

  File "C:\Users\HonorVan\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow

  File "C:\Users\HonorVan\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)

ImportError: Traceback (most recent call last):
  File "C:\Users\HonorVan\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\HonorVan\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\HonorVan\AppData\Roaming\Python\Python36\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 "D:\ProgramData\Anaconda3\lib\imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "D:\ProgramData\Anaconda3\lib\imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: The specified module cannot be found.


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.

During this period, trying to re install CUDA and cudnn has no effect, and demoting CUDA and cudnn also reports the same error

Then I plan to re install tensorflow, use PIP universal tensorflow GPU = = 1.12.0 to uninstall tensorflow GPU, and then use CONDA list to check and find that there is still tensorflow GPU, and there are no less other dependencies. At this time, I re import tensorflow and find that the error has been solved…