Registry / ai-ml / tensorflow-macos

tensorflow-macos

JSON →
library2.16.2pypypiunverified

Apple Silicon native build of TensorFlow 2.x for macOS. Current version 2.16.2, released Aug 2024. Provides GPU acceleration via Metal Performance Shaders (MPS) on Apple M1/M2/M3 hardware. Release cadence follows upstream TensorFlow roughly quarterly.

pip install tensorflow-macos==2.16.2
INSTALL
IMPORT
SIG · TENSORFLOW-MACOS
T
tensorflow-macos
ai-mlpythonv2.16.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

tensorflow
✓ import tensorflow as tf
Standard import, no separate module name.

Verify installation and GPU availability on Apple Silicon.

import tensorflow as tf print("TensorFlow version:", tf.__version__) print("GPU Available:", tf.config.list_physical_devices('GPU')) # Quick matrix multiply to test MPS x = tf.random.normal((1000, 1000)) y = tf.matmul(x, tf.transpose(x)) print("Matrix multiply result shape:", y.shape)
Debug
Known issues
breakingtensorflow-macos was merged into the standard tensorflow package starting from TensorFlow 2.13. Use `pip install tensorflow` instead; installing `tensorflow-macos` may install an older version or break.
fix
Upgrade to TensorFlow 2.13+ and install via `pip install tensorflow`.
affects: >=2.13.0
gotchaGPU acceleration via Metal is not enabled by default. You must install `tensorflow-metal` plugin and verify GPU is detected.
fix
Run `pip install tensorflow-metal` and then check `tf.config.list_physical_devices('GPU')`.
affects: all
deprecatedAs of TensorFlow 2.16, the `tf.compat.v1` module is deprecated and may be removed in future versions. Code relying on TF1.x patterns will break.
fix
Migrate to TF2.x eager execution and tf.function decorators.
affects: >=2.16.0
gotchaThe `tensorflow-macos` package on PyPI only works on Apple Silicon (ARM64) macOS. It will fail to install on Intel Macs or other OS.
fix
Install standard `tensorflow` for Intel Macs.
affects: all
Upgrade
Version history
2.16.2latest on PyPI · released Jun 28, 2024
Audit
Dependencies
tensorflow-metaloptionalProvides Metal GPU acceleration on Apple Silicon; required for GPU training.
numpyrequiredCore dependency for TensorFlow operations.
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
tensorflow-macos — pip install tensorflow-macos · libregistry