NumPy 2.0 changed the C ABI. Any compiled extension built against NumPy 1.x fails at import with a multi-line message beginning A module that was compiled using NumPy 1.x cannot be run in NumPy 2.x, naming the offending module and suggesting either downgrading NumPy or upgrading the module.
The cause is almost never your own code. It is a wheel for pandas, scipy, opencv, pyarrow or a smaller package that was built before the ABI change, pulled in by a lock file or an old constraint. The reverse case exists too: a module compiled against NumPy 2 headers works on NumPy 1.x at runtime, because the 2.x headers deliberately target the older ABI.
The fix is to upgrade the dependency to a release with NumPy 2 wheels, not to downgrade NumPy, which only defers the problem. If a package must be pinned, pin numpy<2 for that environment and record why. When building your own extension, requiring numpy>=2.0 in [build-system] requires produces a binary that runs on both 1.x and 2.x.