0

When running tf.config.list_physical_devices('GPU') the GPU isn't being detected. When I install tensorflow-gpu this error message appears (see below). How can I force TF to use my GPU (RTX 3060).

Collecting tensorflow-gpu
  Using cached tensorflow-gpu-2.12.0.tar.gz (2.6 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: python_version>"3.7" in c:\users\noah brömme\documents\programming\04_tensorflow_face-detection_p\facedetection\facedet\lib\site-packages (from tensorflow-gpu) (0.0.2)
Building wheels for collected packages: tensorflow-gpu
  Building wheel for tensorflow-gpu (setup.py): started
  Building wheel for tensorflow-gpu (setup.py): finished with status 'error'
  Running setup.py clean for tensorflow-gpu
Failed to build tensorflow-gpu
Installing collected packages: tensorflow-gpu
  Running setup.py install for tensorflow-gpu: started
  Running setup.py install for tensorflow-gpu: finished with status 'error'
Output exceeds the size limit. Open the full output data in a text editor
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Noah Brömme\AppData\Local\Temp\pip-install-xcjz7ziv\tensorflow-gpu_9acddda0038c4dff8721a51f73f1954a\setup.py", line 37, in <module>
          raise Exception(TF_REMOVAL_WARNING)
      Exception:
      
      =========================================================
      The "tensorflow-gpu" package has been removed!
      
      Please install "tensorflow" instead.
      
      Other than the name, the two packages have been identical
      since TensorFlow 2.1, or roughly since Sep 2019. For more
      information, see: pypi.org/project/tensorflow-gpu
      =========================================================
      
      
      [end of output]
  
...
╰─> tensorflow-gpu

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
N048
  • 1
  • 2
  • Ignore tensorflow-gpu, look at the log produced when importing tensorflow, and look at the thousands of questions asking the same thing, for exam,ple just today: https://stackoverflow.com/questions/75359439/tensorflow-2-10-0-not-detecting-gpu – Dr. Snoopy Feb 06 '23 at 23:30
  • Ok, I downgraded to 2.10. However the GPU doesn't show up. – N048 Feb 07 '23 at 00:13
  • "look at the log produced when importing tensorflow" this is very important as it tells you which libraries are missing for GPU support. – Dr. Snoopy Feb 07 '23 at 00:27
  • When importing tensorflow it doesn't seem to encounter any errors – N048 Feb 07 '23 at 01:01

1 Answers1

0

"TensorFlow 2.10 was the last TensorFlow release that supported GPU on native-Windows. Starting with TensorFlow 2.11, you will need to install TensorFlow in WSL2, or install tensorflow-cpu and, optionally, try the TensorFlow-DirectML-Plugin"

Please follow the step by step instructions mentioned in this link to install TensorFlow along with checking Hardware and Software requirements for the TensorFlow GPU support in the system.

Please make sure to set the path to the bin directory after downloading all the required software for the GPU setup. Let us know if the issue still perists.