Python: Difference between revisions

Jump to navigation Jump to search
Marked this version for translation
mNo edit summary
(Marked this version for translation)
Line 687: Line 687:
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 ===
=== ImportError: numpy.core.multiarray failed to import === <!--T:119-->


<!--T:120-->
When trying to import a Python module that depends on Numpy, one may encounter <code>ImportError: numpy.core.multiarray failed to import</code>.
When trying to import a Python module that depends on Numpy, one may encounter <code>ImportError: numpy.core.multiarray failed to import</code>.


<!--T:121-->
This is caused by an incompatible version of numpy installed or used and you must install a compatible version.
This is caused by an incompatible version of numpy installed or used and you must install a compatible version.


<!--T:122-->
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.]
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>
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