Stgx
Stgx

Reputation: 11

Installing Tensorflow GPU on Win 8 :

I am trying to install Tensorflow gpu (for Keras) with Anaconda 4.2 for days.

My last attempt was following this tutorial : https://sites.google.com/site/ivanhuertacasado/installing-keras-theano-tensorflow-with-gpu-windows

I don't intend to use theano, only tensorflow-gpu.

My specs are the following :

All the time, I get the same error when I try "import tensorflow", as you can find here :

Using TensorFlow backend.
Traceback (most recent call last):
  File "E:\Users\user\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tenso
rflow_internal.py", line 18, in swig_import_helper
    return importlib.import_module(mname)
  File "E:\Users\user\Anaconda3\lib\importlib\__init__.py", line 126, in import_
module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 577, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 906, in create_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: Le module spécifié est introuvable.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\Users\user\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tenso
rflow.py", line 41, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "E:\Users\user\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tenso
rflow_internal.py", line 21, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "E:\Users\user\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tenso
rflow_internal.py", line 20, in swig_import_helper
    return importlib.import_module('_pywrap_tensorflow_internal')
  File "E:\Users\user\Anaconda3\lib\importlib\__init__.py", line 126, in import_
module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "cifar10_cnn.py", line 11, in <module>
    import keras
  File "E:\Users\user\Anaconda3\lib\site-packages\keras\__init__.py", line 3, in
 <module>
    from . import utils
  File "E:\Users\user\Anaconda3\lib\site-packages\keras\utils\__init__.py", line
 6, in <module>
    from . import conv_utils
  File "E:\Users\user\Anaconda3\lib\site-packages\keras\utils\conv_utils.py", li
ne 3, in <module>
    from .. import backend as K
  File "E:\Users\user\Anaconda3\lib\site-packages\keras\backend\__init__.py", li
ne 83, in <module>
    from .tensorflow_backend import *
  File "E:\Users\user\Anaconda3\lib\site-packages\keras\backend\tensorflow_backe
nd.py", line 1, in <module>
    import tensorflow as tf
  File "E:\Users\user\Anaconda3\lib\site-packages\tensorflow\__init__.py", line
24, in <module>
    from tensorflow.python import *
  File "E:\Users\user\Anaconda3\lib\site-packages\tensorflow\python\__init__.py"
, line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "E:\Users\user\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tenso
rflow.py", line 52, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "E:\Users\user\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tenso
rflow_internal.py", line 18, in swig_import_helper
    return importlib.import_module(mname)
  File "E:\Users\user\Anaconda3\lib\importlib\__init__.py", line 126, in import_
module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 577, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 906, in create_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: Le module spécifié est introuvable.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\Users\user\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tenso
rflow.py", line 41, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "E:\Users\user\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tenso
rflow_internal.py", line 21, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "E:\Users\user\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tenso
rflow_internal.py", line 20, in swig_import_helper
    return importlib.import_module('_pywrap_tensorflow_internal')
  File "E:\Users\user\Anaconda3\lib\importlib\__init__.py", line 126, in import_
module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow_internal'


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources#common_installation_probl
ems

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

The Cpu test works well, but can't find how to work with the gpu.

I have been searching and here is the list of what I can say I tried :

Has anybody any idea ?

Upvotes: 0

Views: 1125

Answers (1)

Stgx
Stgx

Reputation: 11

Ok, so I could fix the issue.

The problem came from Visual Studio 2017.

I uninstalled all version of Cuda (and the CDNN). I uninstalled VS 2017 and all redistrib data

I installed VS 2015 : I installed Cuda 8.0 I installed in the cuda folder the CuDnn 5.1, then the CuDnn 6.0 (I replaced when necessary)

Thus, my problem was fixed. Hope it my help any people.

Upvotes: 1

Related Questions