Q: Use CUDA in virtualenv to serve Theano Lacking root permissions I installed Theano and Lasagne in a python3 virtualenv at Ubuntu 14.04. 
Running some code, I get an ImportError: dnn not available, which as far as I see results from missing CUDA header, although it is installed at /usr/local/cuda-6.5/targets/x86_64-linux/include/cudnn.h.
Following the theano documentation I set environment variable CUDA_ROOT=/usr/local/cuda-6.5, which yields an additional error: 
ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: libcublas.so.6.5: cannot open shared object file: No such file or directory
Is there any way to include this CUDA library into the virtualenv? 

A: Finally found the answer. In addition to environment variables I forgot to configure the .theanorc in my home directory like the theano documentation suggested:
$ cat /home/user/.theanorc
[global]
floatX = float32
device = gpu0

[cuda]
root = /usr/local/cuda-6.5

Thanks anyway! Learned the lesson to read docs carefully ...
