The two-line install (and why it sometimes goes sideways)
pip install mlx mlx-lm in a native ARM Python env. That is the entire intended workflow. Most failures aren't really MLX failures — they're Python-environment failures that show up at the moment you import MLX.
This lesson is short on purpose. The point is to get a clean, reproducible install in a dedicated env, run the verify check, and walk away knowing you can come back to a working setup any day of the week.
Use a dedicated conda env (recommended)
I keep MLX in its own conda env (named, creatively, mlx) and never let it share an env with other ML stacks. The reason isn't religious — MLX has light dependencies and rarely conflicts with anything — it's reproducibility. When you come back in three months and the breaking-change train has rolled through, having a single-purpose env means you upgrade one thing.
The Rosetta trap, in detail
If your python is running under Rosetta x86 emulation, MLX's pip install may quietly succeed and then SIGSEGV on first import mlx.core. The reason: pip resolves a dependency wheel for the wrong architecture and the linker only finds out at import time. The fix is to use a Python that itself reports arm64 from platform.machine().
The cleanest way to guarantee that on macOS is miniforge (or modern miniconda, which now ships native ARM by default). Both create environments where every Python interpreter is genuinely ARM. The one trap to avoid: do not install miniconda from the legacy x86_64 installer on Apple Silicon — the env will look fine and quietly use Rosetta.
Verify, then move on
Three checks; if all three pass you are done with this lesson:
uname -mprintsarm64python -c "import platform; print(platform.machine())"also printsarm64(this is the one Rosetta lies about)import mlx.core as mx; print(mx.__version__)succeeds and prints a version
If you fail step 2 specifically, your Python is under Rosetta — fix that before anything else, no matter how tempting it is to "just try the import and see."