Install & Compatibility
Where this runs
tested against v0.32.2 · 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
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.9s · import 0.000s · 21MB
19MB installed
● package 19MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
mx
✓ import mlx.core as mx
✗ import mlx.core as mx
This quickstart demonstrates creating MLX arrays and performing a basic element-wise operation. It highlights MLX's lazy evaluation model, where computations are built into a graph and executed only when explicitly requested via `.eval()` or conversion to a standard Python type.
import mlx.core as mx
# Create a simple MLX array
a = mx.array([1.0, 2.0, 3.0])
b = mx.array([4.0, 5.0, 6.0])
# Perform an element-wise operation
c = a + b
# MLX uses lazy evaluation. To materialize the result, call .eval()
print(f"Result before evaluation: {c}")
c.eval()
print(f"Result after evaluation: {c}")
# Or convert to a standard Python type (which also triggers evaluation)
print(f"Result as NumPy array: {c.numpy()}")
print(f"Result as Python list: {c.tolist()}")
mlx --version
Debug
Known issues
gotchaMLX is primarily optimized for Apple Silicon (Metal backend). While it has growing experimental CUDA support, optimal performance and access to all features (like Neural Accelerators) are generally found on Apple hardware with compatible macOS versions.fixFor best performance, run MLX on Apple Silicon. If using CUDA, ensure your environment is correctly configured and be aware that some features or performance characteristics may differ from the Metal backend.
affects: All versions
gotchaMLX employs a lazy evaluation model. Operations are recorded into a computation graph and only executed when a result is explicitly requested (e.g., via `.eval()`, `mx.copy()`, or conversion to a standard Python/NumPy type). Not explicitly evaluating can lead to unexpected behavior if intermediate results are needed.fixExplicitly call `.eval()` on MLX arrays (or `mx.eval()` on lists of arrays) when you need to materialize computation results, especially in debugging or when feeding results into non-MLX operations.
affects: All versions
breakingAs MLX is pre-1.0 and under active, rapid development, its API can evolve quickly between minor versions (e.g., 0.x.0 releases). While efforts are made for backward compatibility, breaking changes or significant API alterations can occur.fixPin your `mlx` package version in `requirements.txt`. Always review the release notes for new versions before upgrading, paying close attention to 'Highlights' and 'What's Changed' sections for potential API adjustments.
affects: All 0.x.x versions
gotchaCertain advanced features and performance optimizations, such as the JACCL backend for faster bandwidth or Neural Accelerator support, are tied to specific macOS versions (e.g., macOS >= 26.2 for M5 Neural Accelerators introduced in v0.30.0).fixEnsure your macOS is updated to the latest compatible version for your hardware to leverage the newest MLX features and performance enhancements. Consult the MLX release notes for specific macOS version requirements.
affects: 0.30.0 and later (for specific features)
Upgrade
Version history
0.32.2latest on PyPI · released Aug 25, 2026
Audit
Dependencies
No dependency data recorded yet.