Skip to content

Win10: ImportError: DLL load failed: The specified module could not be found #22794

Closed
@damcclane

Description

@damcclane

System information:

Have I written custom code: No
OS Platform and Distribution: Windows 10 Pro updated
Mobile device: None
TensorFlow installed from: pip install
TensorFlow version: 1.11.0
Python Version: 3.6.6
Bazel version: not installed
CUDA/cuDNN version: CUDA 9.0, cuDNN 8.0
GPU model and memory: GF-GTX970 STRIX
Exact command to reproduce:
pip install tensorflow
pip install tensorflow-gpu
python
import tensorflow as tf

Problem

I have had this error consistently even after trying to downgrade to older versions of CUDA tool, cuDNN, python, tensorflow and tensorflow-gpu. I have updated my enviornment variables. I have installed Visual C++ Redistributable Update.
I have read and tried to follow the solutions from other similar issues (such as #10033 and #17101), but have not succeeded in fixing the problem.

Log

C:\Users\user>python
Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [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:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\user\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\user\AppData\Local\Programs\Python\Python36\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\imp.py", line 343, in load_dynamic
return _load(spec)
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:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_init_.py", line 22, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python_init_.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\user\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\user\AppData\Local\Programs\Python\Python36\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.

Activity

tensorflowbutler

tensorflowbutler commented on Oct 6, 2018

@tensorflowbutler
Member

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Mobile device

damcclane

damcclane commented on Oct 6, 2018

@damcclane
Author

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Mobile device

Ok done.

kennedyCzar

kennedyCzar commented on Oct 7, 2018

@kennedyCzar

I had the same issue while trying to use tensorflow-gpu on windows 10.
Since i couldn't get it to work on cuDNN10..i opted for 9 instead using...

conda create --name tf-gpu
conda install -c aaronzs tensorflow-gpu
conda install -c anaconda cudatoolkit
conda install -c anaconda cudnn
conda install keras-gpu

you can also check the fullpost on https://www.pugetsystems.com/labs/hpc/The-Best-Way-to-Install-TensorFlow-with-GPU-Support-on-Windows-10-Without-Installing-CUDA-1187/

Credit to Dr Donald Kinghorn

umitkilic

umitkilic commented on Oct 15, 2018

@umitkilic

I have same problem with you @damcclane . How did you solve ?

Win10 x64, python 3.6, cuda9 with cudnn 7.0.5 and also Win10 x64, python 3.7, cuda10 with cudnn 7.3.1

Both has the same problem. My graphic card is Nvidia GeForce 1050 Ti

CorentinJ

CorentinJ commented on Oct 15, 2018

@CorentinJ

Same issue. Win10 x64, python 3.5, tensorflow-gpu 1.11.0, CUDA 8 with CUDNN 6 installed.

starcream

starcream commented on Oct 16, 2018

@starcream

Same problem,Win10 x64,python 3.6 ,cuda 9 with cudnn 7.0

henry-huynh-3508

henry-huynh-3508 commented on Oct 17, 2018

@henry-huynh-3508

Same problem, anyone knows how to solve this?

tcllst

tcllst commented on Oct 17, 2018

@tcllst

Same problem here… :(

CorentinJ

CorentinJ commented on Oct 17, 2018

@CorentinJ

I've had this issue in the past and it was because I had the wrong version of CUDNN. You could try downloading a few of them and see if any of those work.

ymodak

ymodak commented on Oct 17, 2018

@ymodak
Contributor

I would like to encourage all who are facing this issue to create a new issue on TensorFlow repo so that we can focus on solving your problem on individual basis since the system config can vary from person to person. Thanks!

197 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @wedesoft@rgov@mihaimaruseac@pallyndr@boldt

      Issue actions

        Win10: ImportError: DLL load failed: The specified module could not be found · Issue #22794 · tensorflow/tensorflow