Problems installing CUDNN

I tried installing CUDNN so as to use tensor Flow. As I was reading the instructions I don’t know how to use this instruction

Add to your build and link process by adding -I to your
line and -L -lcudnn to your link line.

And after compiling in Nvidia-examples I cannot run device Query

And I can install Tensflow without GPU in python but when I tried to install with GPU in Python, it does not work

I get this error message

File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/tensorflow/”, line 24, in
from tensorflow.python import *
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/”, line 49, in
from tensorflow.python import pywrap_tensorflow
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/”, line 52, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/”, line 41, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/”, line 24, in swig_import_helper
_mod = imp.load_module(’_pywrap_tensorflow_internal’, fp, pathname, description)
ImportError: cannot open shared object file: No such file or directory