# Tensorflow does not detect GPU

**URL:** <https://deeptalk.lambda.ai/t/tensorflow-does-not-detect-gpu/2375>\
**Category:** Uncategorized\
**Created:** [May 19, 2021, 1:54pm UTC](https://deeptalk.lambda.ai/t/tensorflow-does-not-detect-gpu/2375 "2021-05-19T13:54:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![R\_G](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@R\_G](https://deeptalk.lambda.ai/u/R_G)\
**Post date:** [May 19, 2021, 1:54pm UTC](https://deeptalk.lambda.ai/t/tensorflow-does-not-detect-gpu/2375/1 "2021-05-19T13:54:27Z")

</div>

Hi,  
I have installed Lmabda stack on ubuntu 20.04 and RTX 3090. Tensorflow 2.4.1 does not detect gpu. What I understand is that cudnn8 is not installed. Here is what i got:

`tf.config.experimental.list_physical_devices('gpu')`

I tensorflow/stream\_executor/platform/default/dso\_loader.cc:49] Successfully opened dynamic library libcusparse.so.11  
2021-05-19 09:48:02.489196: W tensorflow/stream\_executor/platform/default/dso\_loader.cc:60] Could not load dynamic library ‘libcudnn.so.8’; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory  
2021-05-19 09:48:02.489202: W tensorflow/core/common\_runtime/gpu/gpu\_device.cc:1757] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at [قم بتثبيت TensorFlow مع النقطة](https://www.tensorflow.org/install/gpu) for how to download and setup the required libraries for your platform.  
Skipping registering GPU devices…

---

<div class="post-metadata">

**Author:** ![rohan1198](https://avatars.discourse-cdn.com/v4/letter/r/dfb087/32.png) [@rohan1198](https://deeptalk.lambda.ai/u/rohan1198)\
**Post date:** [May 24, 2021, 11:45am UTC](https://deeptalk.lambda.ai/t/tensorflow-does-not-detect-gpu/2375/2 "2021-05-24T11:45:14Z")

</div>

Are you using a Python Virtual environment?

If so, you’ll need to copy over a few files from the Lambda installation to your venv.

More specifically, all the libcudnn packages from /usr/lib/python3/dist-packages/tensorflow.  
Just copy them over to venv\_path/lib/site-packages/tensorflow  
Reboot
