tensorflow
device_error
ai_generated
true
RuntimeError: GPU device not found. Could not list physical devices: GPU
ID: tensorflow/unknown-device-gpu
85%Fix Rate
88%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 2 | active | — | — | — |
Root Cause
TensorFlow does not detect any GPU. NVIDIA driver not installed, CUDA not configured, or tensorflow-cpu installed by mistake.
genericWorkarounds
-
92% success Install the NVIDIA driver and verify with nvidia-smi
sudo apt install nvidia-driver-535 && nvidia-smi # must show your GPU
Sources: https://www.tensorflow.org/guide/gpu
-
90% success Install tensorflow with CUDA support, not tensorflow-cpu
pip install tensorflow[and-cuda] # NOT pip install tensorflow-cpu
-
85% success Verify GPU visibility inside Python
print(tf.config.list_physical_devices('GPU')) # should show your GPU; if empty, check driver/CUDA
Dead Ends
Common approaches that don't work:
-
Install CUDA toolkit without the NVIDIA driver
85% fail
CUDA needs a compatible NVIDIA kernel driver. The toolkit alone is not enough.
-
Install tensorflow-gpu package (deprecated)
78% fail
tensorflow-gpu was merged into tensorflow in TF 2.1+. The separate package is abandoned.