Python: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
Line 686: Line 686:
<!--T:118-->
<!--T:118-->
In doubt, start over with a new virtual environment.
In doubt, start over with a new virtual environment.
=== ImportError: numpy.core.multiarray failed to import ===
When trying to import a Python module that depends on Numpy, one may encounter <code>ImportError: numpy.core.multiarray failed to import</code>.
This is caused by an incompatible version of numpy installed or used and you must install a compatible version.
This is especially true with the [https://numpy.org/devdocs/dev/depending_on_numpy.html#numpy-2-0-specific-advice release of Numpy 2.0 which breaks the ABI.]
In the case of a wheel that was built with version 1.x but installed version 2.x, one must installed a lower version with: <code>pip install --no-index 'numpy<2.0'</code>
</translate>
</translate>
cc_staff
284

edits

Navigation menu