I need help. I'm not able to install Tensorflow with GPU support and I don't really know what else to do

I tried many things to install TensorFlow with GPU support, but I failed every time:

  • I tried to follow the instructions on the TensorFlow web page.
  • I tried on Ubuntu 22 and 24.
  • I tried with TensorFlow 2.16 and 2.15
  • I tried using the cuDNN and Cudatools from Conda and Pip.
  • I tried many guides found on the internet

I don’t know what else to do. So I hope to find someone to help me. What else can I do?


Hi @Nathaldien,

Assuming that your GPU is CUDA-enabled: a revised document addressing the issue of TensorFlow installation for Linux users with GPUs is pending review. Here is the link: docs/site/en/install/pip.md at patch-1 · sgkouzias/docs · GitHub (pull request)

The issue has been raised at GitHub as well.

I hope it helps!

1 Like

I found a solution by myself using Tensorflow 2.15.1. Using Ubuntu 24.04 LTS as OS, I installed Miniconda following the instructions on its website. Just copy and paste these lines in the terminal:

mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
~/miniconda3/bin/conda init bash
~/miniconda3/bin/conda init zsh

Once you are done, close and reopen the terminal. Then copy and paste these lines too:

conda create -n tmpenv python=3.11
conda activate tmpenv
pip install tensorflow[and-cuda]==2.15.1
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

if in the terminal appears :

[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]

Tensorflow is going to use the GPU from now on.


Congratulations @Nathaldien!

In case you wish to try the latest TensorFlow version namely 2.16.1 with Keras version 3.0 and GPU support you can create a new conda environment and follow the instructions from my previous reply.

Happy coding :slightly_smiling_face:

Can the solution work on a laptop of IRIS Graphics since I once came across an article that said your machine needs to have NVIDIA graphics to have the TensorFlow GPU be installed successfully. ( Tensorflow-GPU: How to Install Tensorflow with NVIDIA CUDA,cuDNN and GPU support on Windows | by Ilekura Idowu | Analytics Vidhya | Medium)

@Japheth_Mumo If it’s a question, yes, unfortunately, you need to have an NVIDIA GPU. That means no Intel and no AMD.