Tensorflow doesn't seem to see my gpu

I've tried tensorflow on both cuda 7.5 and 8.0, w/o cudnn (my GPU is old, cudnn doesn't support it).

When I execute device_lib.list_local_devices(), there is no gpu in the output. Theano sees my gpu, and works fine with it, and examples in /usr/share/cuda/samples work fine as well.

I installed tensorflow through pip install. Is my gpu too old for tf to support it? gtx 460


I came across this same issue in jupyter notebooks. This could be an easy fix.

$ pip uninstall tensorflow
$ pip install tensorflow-gpu

You can check if it worked with:

tf.test.gpu_device_name()

Update 2020

It seems like tensorflow 2.0+ comes with gpu capabilities therefore pip install tensorflow should be enough


If you are using conda, you might have installed the cpu version of the tensorflow. Check package list (conda list) of the environment to see if this is the case . If so, remove the package by using conda remove tensorflow and install keras-gpu instead (conda install -c anaconda keras-gpu. This will install everything you need to run your machine learning codes in GPU. Cheers!

P.S. You should check first if you have installed the drivers correctly using nvidia-smi. By default, this is not in your PATH so you might as well need to add the folder to your path. The .exe file can be found at C:\Program Files\NVIDIA Corporation\NVSMI