All of lore.kernel.org
 help / color / mirror / Atom feed
* [zeus] python3-numpy: No module named 'numpy.core._multiarray_umath' #yocto #zeus #python
@ 2021-05-11 16:14 Bel Hadj Salem Talel
  2021-05-11 17:54 ` [yocto] " Konrad Weihmann
  0 siblings, 1 reply; 2+ messages in thread
From: Bel Hadj Salem Talel @ 2021-05-11 16:14 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 3371 bytes --]

Hi All,
I integrated python3-numpy in my image and when trying to import it I get this error: (python3 version: 3.7.7)

------
>>> import cv2
OpenCV bindings requires "numpy" package.
Install it via command:
pip install numpy
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/numpy/core/__init__.py", line 17, in <module>
from . import multiarray
File "/usr/lib/python3.7/site-packages/numpy/core/multiarray.py", line 14, in <module>
from . import overrides
File "/usr/lib/python3.7/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 "<stdin>", line 1, in <module>
File "/usr/lib/python3.7/site-packages/cv2/__init__.py", line 8, in <module>
import numpy
File "/usr/lib/python3.7/site-packages/numpy/__init__.py", line 142, in <module>
root@menzu-media:~# python3
Python 3.7.7 (default, Apr 22 2021, 09:42:29)
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
OpenCV bindings requires "numpy" package.
Install it via command:
pip install numpy
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/numpy/core/__init__.py", line 17, in <module>
from . import multiarray
File "/usr/lib/python3.7/site-packages/numpy/core/multiarray.py", line 14, in <module>
from . import overrides
File "/usr/lib/python3.7/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 "<stdin>", line 1, in <module>
File "/usr/lib/python3.7/site-packages/cv2/__init__.py", line 8, in <module>
import numpy
File "/usr/lib/python3.7/site-packages/numpy/__init__.py", line 142, in <module>
from . import core
File "/usr/lib/python3.7/site-packages/numpy/core/__init__.py", line 47, in <module>
raise ImportError(msg)
ImportError:

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

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
1. Check that you expected to use Python3.7 from "/usr/bin/python3",
and that you have no directories in your PATH or PYTHONPATH that can
interfere with the Python and numpy version "1.17.0" you're trying to use.
2. If (1) looks fine, you can open a new issue at
https://github.com/numpy/numpy/issues.  Please include details on:
- how you installed Python
- how you installed numpy
- your operating system
- whether or not you have multiple versions of Python installed
- if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
(removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

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

Did any one encounter this issue?

Thanks,
Talel

[-- Attachment #2: Type: text/html, Size: 4871 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [yocto] [zeus] python3-numpy: No module named 'numpy.core._multiarray_umath' #yocto #zeus #python
  2021-05-11 16:14 [zeus] python3-numpy: No module named 'numpy.core._multiarray_umath' #yocto #zeus #python Bel Hadj Salem Talel
@ 2021-05-11 17:54 ` Konrad Weihmann
  0 siblings, 0 replies; 2+ messages in thread
From: Konrad Weihmann @ 2021-05-11 17:54 UTC (permalink / raw)
  To: yocto, bhstalel

On 11.05.21 18:14, Bel Hadj Salem Talel wrote:
> Hi All,
> I integrated python3-numpy in my image and when trying to import it I 
> get this error: (python3 version: 3.7.7)
> 
> ------
>  >>> import cv2
> OpenCV bindings requires "numpy" package.
> Install it via command:
>      pip install numpy
> Traceback (most recent call last):
>    File "/usr/lib/python3.7/site-packages/numpy/core/__init__.py", line 
> 17, in <module>
>      from . import multiarray
>    File "/usr/lib/python3.7/site-packages/numpy/core/multiarray.py", 
> line 14, in <module>
>      from . import overrides
>    File "/usr/lib/python3.7/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 "<stdin>", line 1, in <module>
>    File "/usr/lib/python3.7/site-packages/cv2/__init__.py", line 8, in 
> <module>
>      import numpy
>    File "/usr/lib/python3.7/site-packages/numpy/__init__.py", line 142, 
> in <module>
> root@menzu-media:~# python3
> Python 3.7.7 (default, Apr 22 2021, 09:42:29)
> [GCC 9.2.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> import cv2
> OpenCV bindings requires "numpy" package.
> Install it via command:
>      pip install numpy
> Traceback (most recent call last):
>    File "/usr/lib/python3.7/site-packages/numpy/core/__init__.py", line 
> 17, in <module>
>      from . import multiarray
>    File "/usr/lib/python3.7/site-packages/numpy/core/multiarray.py", 
> line 14, in <module>
>      from . import overrides
>    File "/usr/lib/python3.7/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 "<stdin>", line 1, in <module>
>    File "/usr/lib/python3.7/site-packages/cv2/__init__.py", line 8, in 
> <module>
>      import numpy
>    File "/usr/lib/python3.7/site-packages/numpy/__init__.py", line 142, 
> in <module>
>      from . import core
>    File "/usr/lib/python3.7/site-packages/numpy/core/__init__.py", line 
> 47, in <module>
>      raise ImportError(msg)
> ImportError:
> IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
> Importing the numpy c-extensions failed.
> - Try uninstalling and reinstalling numpy.
> - If you have already done that, then:
>    1. Check that you expected to use Python3.7 from "/usr/bin/python3",
>       and that you have no directories in your PATH or PYTHONPATH that can
>       interfere with the Python and numpy version "1.17.0" you're trying 
> to use.
>    2. If (1) looks fine, you can open a new issue at
>       https://github.com/numpy/numpy/issues.  Please include details on:
>       - how you installed Python
>       - how you installed numpy
>       - your operating system
>       - whether or not you have multiple versions of Python installed
>       - if you built from source, your compiler versions and ideally a 
> build log
> - If you're working with a numpy git repository, try `git clean -xdf`
>    (removes all files not under version control) and rebuild numpy.
> Note: this error has many possible causes, so please don't comment on
> an existing issue about this - open a new one instead.
> Original error was: No module named 'numpy.core._multiarray_umath'
> ----------
> 
> Did any one encounter this issue?

According to [1] yes - you might want to consider back porting one of 
the more recent versions of numpy from [2], as you are using a pretty 
outdated one

[1] 
https://stackoverflow.com/questions/54665842/when-importing-tensorflow-i-get-the-following-error-no-module-named-numpy-cor
[2] http://layers.openembedded.org/layerindex/recipe/51338/

Also the github issue tracker of numpy contains at least one issue of 
the same sort

> 
> Thanks,
> Talel
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-11 17:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 16:14 [zeus] python3-numpy: No module named 'numpy.core._multiarray_umath' #yocto #zeus #python Bel Hadj Salem Talel
2021-05-11 17:54 ` [yocto] " Konrad Weihmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.