2

I've followed this stackoverflow answer. Then, I've tried this nvidia steps (conda install cuda -c nvidia) to install it in a conda env. But when I try

import tensorflow as tf
tf.config.list_physical_devices('GPU')
# output: []

I have a 3070 GPU. What am I doing wrong?

Omar
  • 1,029
  • 2
  • 13
  • 33
  • 1
    Install Tensorflow-gpu using conda with these steps`conda create -n tf_gpu python=3.9` and `conda activate tf_gpu` and `conda install cudatoolkit==11.2` and `pip install tensorflow`. Verify installation `import tensorflow as tf` and `print(len(tf.config.list_physical_devices('GPU')))`. Thanks –  Dec 13 '21 at 11:37

1 Answers1

1

visit https://www.tensorflow.org/install/pip and follow the procedure. Most likely you did not provide some of software requirements. I had the same issue when i did not install the cuda toolkit. After installing cuda and cudnn it was fixed for me.