Mlx env setup
Skill alpharomercoma/mlx-agentic-development/skills/mlx-env-setup
Install and verify an MLX environment on Apple silicon. Use when the user says "install MLX", "pip install mlx", "MLX won't import", "no GPU found", "which Python for MLX", "mlx-lm install", "MLX requirements", or a script fails at `import mlx`.From its SKILL.md
npx -y skills add alpharomercoma/mlx-agentic-development --skill mlx-env-setupAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.8 KB, as published. Nobody here has run it
MLX environment setup
Complexity Assessment
Simple — fresh install. Run the block below, then the verification gate. Stop.
Medium — an existing environment misbehaving. Run the gate first; it usually names the problem.
Complex — building from source, CUDA, or C++ extensions. Read
the build requirements below, and run
scripts/probe_mlx_env.py to see what your installed build actually reports.
Install
uv venv --python 3.12 .venv && uv pip install --python .venv/bin/python mlx mlx-lm
Requirements, all hard:
- Apple silicon. MLX's Metal backend does not exist on Intel Macs.
- Native arm64 Python ≥ 3.10. A Rosetta Python fails; check with
python -c "import platform; print(platform.processor())"— it must printarm. - macOS ≥ 14.0 for MLX at all; ≥ 26.2 for the M5 Neural Accelerator paths.
Do not use the system Python on macOS: it is typically 3.9, below MLX's minimum.
Building from source additionally needs full Xcode (≥ 15) and, on M5,
MACOSX_DEPLOYMENT_TARGET=26.2 — without it you get a binary with no NAX kernels
and silently lose the accelerated paths. The PyPI wheel already includes them.
Verification gate — run this before anything else
import mlx.core as mx
print(mx.__version__, mx.metal.is_available())
print(mx.device_info())
metal.is_available() must be True and device_info()["architecture"] should look
like applegpu_gNNx. If Metal is unavailable, nothing else in the kit applies.
For chip generation, memory, and Neural Accelerator eligibility, run
hooks/scripts/detect-apple-silicon.py, which evaluates MLX's actual runtime gate
rather than guessing from the chip name.
Current versions and dead ends
Pin versions; MLX ships roughly monthly and the API moves.
mlx0.32.0 andmlx-lm0.31.3 as of 2026-08-04. mlx-lm lags mlx.mlx-examplesis superseded: LLM tooling now lives in the standaloneml-explore/mlx-lmrepo and package.mlx-onnxis dead (last commit Feb 2024). Do not use it.mlx-vlm,mlx-audio, andmlx-lm-loraare community packages, not ml-explore. The official Swift-side LLM/VLM home isml-explore/mlx-swift-lm.- MLX has a CUDA backend on Linux (
pip install mlx[cuda12]), with incomplete parity. NAX, Metal capture, and.metallibextensions are Metal-only;mx.fast.cuda_kernelis CUDA-only.
Honesty rails
- Report the exact versions you verified against. "Works with MLX" is not a claim.
- If you could not run something, say so rather than asserting it works.