Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load the native TensorFlow runtime. (ImportError: DLL load failed) #27984

Closed
vitalfadeev opened this issue Apr 19, 2019 · 3 comments
Closed

Comments

@vitalfadeev
Copy link

vitalfadeev commented Apr 19, 2019

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 x64
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: -
  • TensorFlow installed from (source or binary): pip install tensorflow-gpu
  • TensorFlow version: 1.13.1
  • Python version: 3.6.8 x64
  • Installed using virtualenv? pip? conda?: pip install tensorflow-gpu
  • Bazel version (if compiling from source): -
  • GCC/Compiler version (if compiling from source): -
  • CUDA/cuDNN version: 9.0 / cudnn-9.0-windows10-x64-v7.5.0.56.zip
  • GPU model and memory: GeForce 610M

Describe the problem
We want run OpenNMT-tf.
Install tensorflow.
Run simple test. Get error.
Help wanted.

Provide the exact sequence of commands / steps that you executed before running into the problem
python -c "import tensorflow as tf; print(tf.version)"

Any other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

python -c "import tensorflow as tf; print(tf.version)"
Traceback (most recent call last):
File "C:\venv113\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\venv113\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\venv113\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:\venv113\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\venv113\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: Не найден указанный модуль.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "C:\venv113\lib\site-packages\tensorflow_init_.py", line 24, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\venv113\lib\site-packages\tensorflow\python_init_.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "C:\venv113\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\venv113\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\venv113\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\venv113\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:\venv113\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\venv113\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: Не найден указанный модуль.

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

@lostmsu
Copy link

lostmsu commented Apr 19, 2019

Having faced the same issue myself, I'd like to request TensorFlow to report which DLL failed to load.

@vitalfadeev
Copy link
Author

vitalfadeev commented Apr 21, 2019

I solve problem.
Two case:

  1. Need CUDA + GPU driver with CUDA support. See: https://docs.nvidia.com/deploy/cuda-compatibility/index.html
  2. For non GPU computing, wirh CPU without AVX need download TensorFlow binariies from here: https://github.com/fo40225/tensorflow-windows-wheel

Solved. Closed.

@wwdok
Copy link

wwdok commented Jan 29, 2020

I met the same issue today, but now i fix it according the comment of abdulrahman-khankan in this issue. In brief, i just install Microsoft Visual C++ Redistributable for Visual Studio 2019 and reboot the computer.
System information : win 10, python 3.7.4 , tensorflow-gpu 2.1 cuda 10.1 cudnn7.6.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants