Why tensorflow doesn't see my GPU when installing it in a conda environment?

I have Ubuntu 20.04, Nvidia RTX 2060, drivers 530, and CUDA 12.1. When I setup an environment in my Anaconda and install conda install tensorflow==2.x it doesn’t see my GPU. Then I have to install tensorflow-gpu==2.x. Why it is so? Should it work just installing pure tensorflow?



According to Release TensorFlow 2.12.0 · tensorflow/tensorflow · GitHub

tensorflow-gpu has been removed. Please install tensorflow instead. The tensorflow package supports GPU accelerated operations via Nvidia CUDA.

According to tested build configurations, CUDA 12.1 is not supported yet.

We recommend that you follow the step-by-step instructions as mentioned here and let us know?

Thank you!

Tensorflow isn’t published to Anaconda any more. If you want the latest you should either use PyPI or conda forge, i.e. pip install tensorflow or conda install -c conda-forge tensorflow.

I didn’t know I had to install CUDA and cudNN inside my anaconda env as described in the TF tutorial. After doing that, it has worked!