Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 3.9. - Original error was: No module named 'numpy.core._multiarray_umath'

When i am running my python-program from my 3.9. venv i got this error (what is not clear for me, is that showing in the error the python 3.6. site package - but this venv kivypython3.9 is on the 3.9. version...)

(kivypython39) rapid1898@rapid1898-B85-HD3:~/DEV/.venv/kivypython39/bin$ python3 -c "import numpy"
Traceback (most recent call last):
  File "/home/rapid1898/.local/lib/python3.6/site-packages/numpy/core/__init__.py", line 22, in <module>
    from . import multiarray
  File "/home/rapid1898/.local/lib/python3.6/site-packages/numpy/core/multiarray.py", line 12, in <module>
    from . import overrides
  File "/home/rapid1898/.local/lib/python3.6/site-packages/numpy/core/overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/rapid1898/.local/lib/python3.6/site-packages/numpy/__init__.py", line 140, in <module>
    from . import core
  File "/home/rapid1898/.local/lib/python3.6/site-packages/numpy/core/__init__.py", line 48, in <module>
    raise ImportError(msg)
ImportError: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.9 from "/home/rapid1898/DEV/.venv/kivypython39/bin/python3"
  * The NumPy version is: "1.19.5"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: No module named 'numpy.core._multiarray_umath'

pip list shows (beside other modules...)

(kivypython39) rapid1898@rapid1898-B85-HD3:~/DEV$ pip3 list
Package              Version
-------------------- ----------
numpy                1.19.5

When i run the program in my 3.6. environment everything works fine.

(kivyapp) rapid1898@rapid1898-B85-HD3:~/DEV$ python3 -c "import numpy"

In the venv is installed the exactly same version:

(kivyapp) rapid1898@rapid1898-B85-HD3:~/DEV$ pip3 list
Package              Version
-------------------- ----------
numpy                1.19.5
like image 578
Rapid1898 Avatar asked Feb 18 '26 00:02

Rapid1898


1 Answers

Found the solution for my environment -

  • deinstalled numpy with

    pip3 uninstall numpy

(had to do this 3 times, cause there where 3 different versions installed)

  • deinstalled pandas
  • installed numpy
  • installed pandas
like image 199
Rapid1898 Avatar answered Feb 21 '26 07:02

Rapid1898



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!