Reputation: 1208
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
Upvotes: 3
Views: 17363
Reputation: 1208
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)
Upvotes: 3