Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing the multiarray numpy extension module failed #1

Closed
billypoydar opened this issue May 17, 2020 · 2 comments
Closed

Importing the multiarray numpy extension module failed #1

billypoydar opened this issue May 17, 2020 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@billypoydar
Copy link

When executing the command

mockingbird --frame ./iPhone 11 Pro.psd --screenshots ./Simulator Screen Shot - iPhone 11 Pro - 2020-05-14 at 14.43.36 copy.png

I get the error

File "/Users/billypoydar/Library/Python/3.8/lib/python/site-packages/numpy/core/__init__.py", line 40, in <module>
    from . import multiarray
  File "/Users/billypoydar/Library/Python/3.8/lib/python/site-packages/numpy/core/multiarray.py", line 13, in <module>
    from . import overrides
  File "/Users/billypoydar/Library/Python/3.8/lib/python/site-packages/numpy/core/overrides.py", line 6, in <module>
    from numpy.core._multiarray_umath import (
ImportError: dlopen(/Users/billypoydar/Library/Python/3.8/lib/python/site-packages/numpy/core/_multiarray_umath.so, 2): Symbol not found: _PyBuffer_Type
  Referenced from: /Users/billypoydar/Library/Python/3.8/lib/python/site-packages/numpy/core/_multiarray_umath.so
  Expected in: flat namespace
 in /Users/billypoydar/Library/Python/3.8/lib/python/site-packages/numpy/core/_multiarray_umath.so

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/billypoydar/Library/Python/3.8/lib/python/site-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/Users/billypoydar/Library/Python/3.8/lib/python/site-packages/numpy/core/__init__.py", line 71, in <module>
    raise ImportError(msg)
ImportError:

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

Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
Here is how to proceed:
- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.
- If you are simply trying to use the numpy version that you have installed:
  your installation is broken - please reinstall numpy.
- If you have already reinstalled and that did not fix the problem, then:
  1. Check that you are using the Python you expect (you're using /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8),
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy versions 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

     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: dlopen(/Users/billypoydar/Library/Python/3.8/lib/python/site-packages/numpy/core/_multiarray_umath.so, 2): Symbol not found: _PyBuffer_Type
  Referenced from: /Users/billypoydar/Library/Python/3.8/lib/python/site-packages/numpy/core/_multiarray_umath.so
  Expected in: flat namespace
 in /Users/billypoydar/Library/Python/3.8/lib/python/site-packages/numpy/core/_multiarray_umath.so

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/mockingbird", line 7, in <module>
    import cv2 as cv
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/cv2/__init__.py", line 5, in <module>
    from .cv2 import *
ImportError: numpy.core.multiarray failed to import
billypoydar@billys-mbp-2018 mockingbird % mockingbird --frame ./iPhone 11 Pro.psd --screenshots ./Simulator Screen Shot - iPhone 11 Pro - 2020-05-14 at 14.43.36 copy.png
ModuleNotFoundError: No module named 'numpy'
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/mockingbird", line 7, in <module>
    import cv2 as cv
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/cv2/__init__.py", line 5, in <module>
    from .cv2 import *
ImportError: numpy.core.multiarray failed to import
@FlixMa
Copy link
Owner

FlixMa commented May 17, 2020

Could you supply some more information please?
Have you tried with a different version of python, eg python 3.7?
Also did you try what the message says? It might be problem with your numpy installation.

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

Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
Here is how to proceed:

  • If you're working with a numpy git repository, try git clean -xdf
    (removes all files not under version control) and rebuild numpy.
  • If you are simply trying to use the numpy version that you have installed:
    your installation is broken - please reinstall numpy.
  • If you have already reinstalled and that did not fix the problem, then:
    1. Check that you are using the Python you expect (you're using /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8),
      and that you have no directories in your PATH or PYTHONPATH that can
      interfere with the Python and numpy versions 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

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

@FlixMa FlixMa added the question Further information is requested label May 17, 2020
@FlixMa FlixMa self-assigned this May 17, 2020
@FlixMa
Copy link
Owner

FlixMa commented May 28, 2020

I will close this issue. Feel free to reopen it, if the error pops up again :-)

@FlixMa FlixMa closed this as completed May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants