Registry / ai-ml / tensorflow-gpu

tensorflow-gpu

JSON →
library2.12.0pypypi✓ verified 85d ago

DEPRECATED – You should install 'tensorflow' instead. Since TensorFlow 2.11, the GPU support is built into the main tensorflow package for Windows and Linux. The tensorflow-gpu package on PyPI is now a dummy package that simply installs tensorflow. It was removed entirely as of version 2.12.0. Previous breaking changes include Python 3.6 support dropped in 2.1.0 and the legacy TF 1.x API removal in 2.0.

pip install tensorflow
INSTALL
IMPORT
SIG · TENSORFLOW-GPU
T
tensorflow-gpu
ai-mlpythonv2.12.0
Install
69.2s avg
Import
8670ms
Disk
2867MB
Pass rate
1/ 10
Env Coverage1 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.11.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 69.15s
py 3.11
✕ build_error
1/2 runs
py 3.12
✕ build_error
1/2 runs
py 3.13
✕ build_error
1/2 runs
py 3.9
✕ build_error
1/2 runs
2867MB installed
● package 2867MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

tensorflow
import tensorflow as tf
import tensorflow-gpu as tf
The package name is tensorflow, regardless of GPU or CPU. Use 'import tensorflow' and TF will automatically use GPU if available.
tf.test.is_gpu_available
import tensorflow as tf; tf.config.list_physical_devices('GPU')
tf.test.is_gpu_available()
is_gpu_available() is deprecated since TF 2.1.0 and removed in TF 2.11. Use tf.config.list_physical_devices('GPU') instead.

Basic GPU check and matrix multiplication.

import tensorflow as tf import os # Check GPU availability physical_devices = tf.config.list_physical_devices('GPU') if len(physical_devices) > 0: print("GPU available:", physical_devices) else: print("No GPU found.") # Simple matrix multiplication import numpy as np a = tf.constant(np.random.rand(1000, 1000)) b = tf.constant(np.random.rand(1000, 1000)) c = tf.matmul(a, b) print("Result shape:", c.shape)
Debug
Known issues
deprecatedtensorflow-gpu is no longer a separate package. Install 'tensorflow' for both CPU and GPU support.
fix
Run 'pip uninstall tensorflow-gpu' and 'pip install tensorflow'.
affects: >=2.12.0
breakingPython 3.6 support was dropped in TensorFlow 2.1.0.
fix
Use Python 3.7 or later.
affects: >=2.1.0
breakingTensorFlow 2.0 removed legacy TF 1.x API (tf.Session, tf.Graph, etc.)
fix
Migrate code to use eager execution and Keras API. See official migration guide.
affects: >=2.0.0
gotchaCUDA and cuDNN version mismatches cause runtime errors. TensorFlow requires specific versions.
fix
Check official compatibility matrix at tensorflow.org/install/source#gpu
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'tensorflow-gpu'
The tensorflow-gpu package has been removed from PyPI since version 2.12.0.
fix
Use 'import tensorflow' after installing 'tensorflow' (pip install tensorflow).
ImportError: cannot import name 'is_gpu_available' from 'tensorflow.python.client'
tf.test.is_gpu_available() was removed in TensorFlow 2.11.
fix
Use tf.config.list_physical_devices('GPU') to check GPU availability.
RuntimeError: The Session graph is empty. Add operations to the graph before calling run().
Legacy TF 1.x code using tf.Session() in TF 2.x with disabled v1 compatibility.
fix
Enable TF 2.x behavior by default or rewrite using Keras API. Use tf.compat.v1 to retain v1 compatibility if necessary.
Upgrade
Version history
2.12.0latest on PyPI · released Jan 24, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
26 hits · last 30 days
node
24
OpenAI (training)
1
Resources
tensorflow-gpu — pip install tensorflow-gpu · libregistry