ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
Third-person routing text. Explains how to fix the ModuleNotFoundError for numpy.core._multiarray_umath: a clean reinstall of numpy clears out the mixed 1.x and 2.x files that cause it. Use when an agent sees this error on plain import numpy. Not for general numpy install problems where numpy was never installed.
TL;DR: this error means your numpy install is a mix of numpy 1.x and 2.x files. Uninstall numpy, delete any leftover numpy folders from site-packages by hand, then install numpy fresh. In numpy 2.x the compiled submodule moved from numpy.core to numpy._core, so old leftovers break the import.
The error
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'Fix it
- Uninstall numpy completely:
pip uninstall -y numpyExpected: it reports the package was removed.
- Check for leftover numpy folders your uninstaller missed:
python -c "import site, os; print([p for p in site.getsitepackages()])"Look inside each listed folder for a directory named numpy and delete it. Expected: no numpy folder remains in site-packages.
- Install numpy fresh:
pip install numpyExpected: install completes with no errors.
- Verify:
python -c "import numpy; print(numpy.__version__)"Expected: prints a version like 2.1.3 with no error.
When this applies
Use this when plain import numpy raises ModuleNotFoundError for numpy.core.multiarrayumath, usually right after upgrading numpy or mixing pip and conda installs.
When it does not apply
If numpy was never installed (plain ModuleNotFoundError: No module named 'numpy'), just install it. If the error mentions a different missing submodule, the mixed-install theory may not hold.
Compatibility
numpy 2.x on any platform. The old path numpy.core.multiarrayumath existed through numpy 1.26.
Root cause
NumPy 2.0 renamed the private core package from numpy.core to numpy.core. A partial upgrade leaves 1.x files (which expect the old path) next to 2.x files, and the import machinery cannot find the compiled multiarray_umath extension at the old location.
Edge cases
If you use conda, run the same cleanup with conda (conda remove numpy, delete leftovers, conda install numpy). If numpy was installed with --user, also check the user site-packages folder. A virtualenv that is cheaper to recreate can just be rebuilt.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.