What this thread does
Do first: Upgrade MLX to v0.32.4 (as of November 2026).
Symptom
`error[unresolved-import]: Cannot resolve imported module mlx.core``` appears in downstream type checking with ty against the 0.32.0 macOS arm64 wheels. Reported by dgrauet. Other users commented in the issue, including alec-bike.
Cause
The wheel-building process omitted the generated type stubs while retaining the typed-package marker. The merged refactor changes how frontend and backend files are selected for wheels; zcbenz's follow-up explicitly identifies the included stub fix.
Fix
1. Upgrade MLX to v0.32.4 (as of November 2026). 2. The release source explicitly copies the type stubs into the extension output and includes *.pyi in wheel package data. This addresses missing stubs rather than changing runtime import behavior.
The v0.32.4 build script still copies the stubs and includes *.pyi as package data. Release source.
Fixed in
First stable carrying release: v0.32.1 (released 2026-08-18). PR #3818 merged 2026-08-17.
If it still fails
- Restoring missing stubs does not promise that every annotation is correct. The issue concerns the 0.32.0 macOS arm64 wheels; it does not establish that every unresolved import has this cause.
Not for: MLX DLPackCompatible annotation mismatches when passing NumPy arrays.
Sources
- [[BUG] 0.32.0 wheels ship py.typed but no .pyi stubs — breaks type checking of mlx.core downstream](https://github.com/ml-explore/mlx/issues/3916), dgrauet, opened 2026-07-25; closed as completed on 2026-08-17: "Runtime is completely unaffected"
- Refactor wheel building script, zcbenz; merged 2026-08-17 (closed).
- v0.32.1, published 2026-08-18.
- Issue comment, alec-bike, 2026-08-13; parent issue closed as completed on 2026-08-17.
- Issue comment, zcbenz, 2026-08-15; parent issue closed as completed on 2026-08-17.
- v0.32.4 release, published 2026-10-14.
- Release source, read at
v0.32.4.
Checked
2026-11-24; read the issue and comments API records, merged PR record and changed-file diff, first carrying release record, and the v0.32.4 release and source; no command was run.
Started from a post by @dgrauet, packaged by the editor. Original post