title: Installing Tensorflow GPU on Win 8 :
body: <p>I am trying to install Tensorflow gpu (for Keras) with Anaconda 4.2 for days.</p>
  
  <p>My last attempt was following this tutorial : <a href="https://sites.google.com/site/ivanhuertacasado/installing-keras-theano-tensorflow-with-gpu-windows" rel="nofollow noreferrer">https://sites.google.com/site/ivanhuertacasado/installing-keras-theano-tensorflow-with-gpu-windows</a></p>
  
  <p>I don't intend to use theano, only tensorflow-gpu.</p>
  
  <p>My specs are the following : </p>
  
  <ul>
  <li>Windows 8.1, 64 bits</li>
  <li>Geforce GTX 860M (for notebook)</li>
  <li>I tried all version of Cudnn, from 5 to 7 with Cuda 8 and 9 (almost).</li>
  </ul>
  
  <p>All the time, I get the same error when I try "import tensorflow", as you can find here :</p>
  
  <pre><code>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 "&lt;frozen importlib._bootstrap&gt;", line 986, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 969, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 958, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 666, in _load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 577, in module_from_spec
    File "&lt;frozen importlib._bootstrap_external&gt;", line 906, in create_module
    File "&lt;frozen importlib._bootstrap&gt;", 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 &lt;module&gt;
      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 &lt;module&gt;
      _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 &lt;module&gt;
      import keras
    File "E:\Users\user\Anaconda3\lib\site-packages\keras\__init__.py", line 3, in
   &lt;module&gt;
      from . import utils
    File "E:\Users\user\Anaconda3\lib\site-packages\keras\utils\__init__.py", line
   6, in &lt;module&gt;
      from . import conv_utils
    File "E:\Users\user\Anaconda3\lib\site-packages\keras\utils\conv_utils.py", li
  ne 3, in &lt;module&gt;
      from .. import backend as K
    File "E:\Users\user\Anaconda3\lib\site-packages\keras\backend\__init__.py", li
  ne 83, in &lt;module&gt;
      from .tensorflow_backend import *
    File "E:\Users\user\Anaconda3\lib\site-packages\keras\backend\tensorflow_backe
  nd.py", line 1, in &lt;module&gt;
      import tensorflow as tf
    File "E:\Users\user\Anaconda3\lib\site-packages\tensorflow\__init__.py", line
  24, in &lt;module&gt;
      from tensorflow.python import *
    File "E:\Users\user\Anaconda3\lib\site-packages\tensorflow\python\__init__.py"
  , line 49, in &lt;module&gt;
      from tensorflow.python import pywrap_tensorflow
    File "E:\Users\user\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tenso
  rflow.py", line 52, in &lt;module&gt;
      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 "&lt;frozen importlib._bootstrap&gt;", line 986, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 969, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 958, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 666, in _load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 577, in module_from_spec
    File "&lt;frozen importlib._bootstrap_external&gt;", line 906, in create_module
    File "&lt;frozen importlib._bootstrap&gt;", 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 &lt;module&gt;
      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 &lt;module&gt;
      _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.
  </code></pre>
  
  <p>The Cpu test works well, but can't find how to work with the gpu.</p>
  
  <p>I have been searching and here is the list of what I can say I tried :</p>
  
  <ul>
  <li>Checking System32, if there is MSVCP140.DLL. There is the Dll. I cannot install VC++ redistribuable 2015 since there is already the 2017 version on my computer. And I uninstalled/installed it again to check.</li>
  <li>I set %CUDA_HOME% as C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA</li>
  <li>I set %CUDA_PATH% as C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0</li>
  <li>I added the .DLL extension to the %PATH_EXT%</li>
  <li>%PATH% targets to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin</li>
  <li>All the time, I move the Cudnn to their respective Cuda folder (bin/includes/...)</li>
  <li>In the CMD, cudnn64_5.dll is found correctly (no matter in which directory I am, the cmd finds it).</li>
  <li>My GeForce Game Ready Driver is up to date</li>
  <li><p>I was not able to get the GPU working with Theano</p>
  
  <p>ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: ('nvcc return st
  atus', 255, 'for cmd', 'nvcc -shared -O3 --compiler-bindir E:\Program Files (x8
  6)\Microsoft Visual Studio\2017\Community\VC -Xlinker /DEBUG -D HAVE_ROUND -
  m64 -Xcompiler -DCUDA_NDARRAY_CUH=mc72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEP
  RECATED_API=NPY_1_7_API_VERSION,/Zi,/MD -I"E:\Users\user\Anaconda3\lib\site
  -packages\theano\sandbox\cuda" -I"E:\Users\user\Anaconda3\lib\site-packa
  ges\numpy\core\include" -I"E:\Users\user\Anaconda3\include" -I"E:\Users\
  \user\Anaconda3\lib\site-packages\theano\gof" -L"E:\Users\user\Anaconda3
  \libs" -L"E:\Users\user\Anaconda3" -o C:\Users\user\AppData\Local\Thean
  o\compiledir_Windows-8.1-6.3.9600-SP0-Intel64_Family_6_Model_60_Stepping_3_Genu
  ineIntel-3.5.2-64\cuda_ndarray\cuda_ndarray.pyd mod.cu -lcublas -lpython35 -lc
  udart')
  WARNING (theano.sandbox.cuda): The cuda backend is deprecated and will be remove
  d in the next release (v0.10).  Please switch to the gpuarray backend. You can g
  et more information about how to switch at this URL:
   <a href="https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpua" rel="nofollow noreferrer">https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpua</a>
  rray%29</p>
  
  <p>WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not availabl
  e  (error: cuda unavailable)
  forrtl: error (200): program aborting due to control-C event
  Image              PC                Routine            Line        Source</p>
  
  <p>libifcoremd.dll    00007FFA853843E4  Unknown               Unknown  Unknown
  KERNELBASE.dll     00007FFAB27CD37F  Unknown               Unknown  Unknown
  KERNEL32.DLL       00007FFAB44413D2  Unknown               Unknown  Unknown
  ntdll.dll          00007FFAB54854E4  Unknown               Unknown  Unknown</p></li>
  <li><p>Cuda works properly in the Sample provided by nvidia</p></li>
  <li><p>Nvcc --version returns the following :</p>
  
  <p>C:\Users\user>nvcc --version
  nvcc: NVIDIA (R) Cuda compiler driver
  Copyright (c) 2005-2016 NVIDIA Corporation
  Built on Mon_Jan__9_17:32:33_CST_2017
  Cuda compilation tools, release 8.0, V8.0.60</p></li>
  </ul>
  
  <p>Has anybody any idea ?</p>