SolvedTheano fatal error: cudnn.h: No such file or directory

Doing import theano from conda 2.7 (Windows) gives this:

Can not use cuDNN on context None: cannot compile with cuDNN. We got this error:
c:\users\nikhil\appdata\local\temp\try_flags_ef1xq6.c:4:19: fatal error: cudnn.h: No such file or directory.
Compilation terminated.

I installed CUDA 8.0 with the installer from Nvidia's website and then copied cudnn into the respective folders at C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0. Cudnn.h is in the includes folder at that location, but it can't find it.

18 Answers

✔️Accepted Answer

Could you add the following to your .theanorc and retry (on Windows) ?

[dnn]

include_path=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include
library_path=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64

Other Answers:

I installed libgpuarray and Theano from the source and got the same issue on Ubuntu 16.04.

I'm using cudnn 6 and cuda 8

My .theanorc file is

[global]
floatX = float32
device=cuda
optimizer=fast_run

[blas]
ldflags = -L/usr/local/lib -lopenblas

[nvcc]
fastmath = True

Related Issues:

34
Theano Ubuntu 16.04 and CUDA
There is no problem with Theano I tried it and we need to work around 2 problems that aren't depende...
15
Theano CUDA is installed, but device gpu0 is not available
Dear All Hey friends I'd like to ask for some help I recently bought a Nvidia G 970 card and would l...
15
Theano Theano Runtime Error - must set MKL_THREADING_LAYER=GNU in environement
After running into this the solution is quite easy to do from within Python like this: Couldn't this...
14
Theano I'm getting an ImportError in Theano in Anaconda
Finally got rid of the warning with: When I import keras or theano after downloading it with Anacond...
9
Theano fatal error: cudnn.h: No such file or directory
Could you add the following to your .theanorc and retry (on Windows) ? Doing import theano from cond...