0
votes

I just installed CUDA 92 CUDANN and Tensor Flow on my Windows 10 laptop.

I am unable to import tensor flow in Python. I get a trace from Python that says:

can't load a dll

But it doesn't say which one it is. Here is a directory listing the trace I received. Can you help.

PS C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\bin> python Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. import tensorflow as tf Traceback (most recent call last): File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in _pywrap_tensorflow_internal = swig_import_helper() File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 17, in swig_import_helper return importlib.import_module(mname) File "C:\Program Files\Anaconda3\lib\importlib__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow__init__.py", line 24, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python__init__.py", line 49, in from tensorflow.python import pywrap_tensorflow File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in raise ImportError(msg) ImportError: Traceback (most recent call last): File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in _pywrap_tensorflow_internal = swig_import_helper() File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 17, in swig_import_helper return importlib.import_module(mname) File "C:\Program Files\Anaconda3\lib\importlib__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: DLL load failed: The specified module could not be found.

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources#common_installation_problems

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

1

1 Answers

0
votes

Mostly in windows its caused by MSVCP140.dll missing if you install

Microsoft Visual C++

if that doesn't help, following dependencies are also there for tensotorflow:

KERNEL32.dll

WSOCK32.dll

WS2_32.dll

SHLWAPI.dll

python35.dll

MSVCP140.dll

VCRUNTIME140.dll

api-ms-win-crt-runtime-l1-1-0.dll

api-ms-win-crt-heap-l1-1-0.dll

api-ms-win-crt-utility-l1-1-0.dll

api-ms-win-crt-stdio-l1-1-0.dll

api-ms-win-crt-string-l1-1-0.dll

api-ms-win-crt-math-l1-1-0.dll

api-ms-win-crt-convert-l1-1-0.dll

api-ms-win-crt-environment-l1-1-0.dll

api-ms-win-crt-filesystem-l1-1-0.dll

api-ms-win-crt-time-l1-1-0.dll