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

MACOS Apple M1 Pro an exception occurred #35

Open
bigfish1913 opened this issue May 15, 2022 · 3 comments
Open

MACOS Apple M1 Pro an exception occurred #35

bigfish1913 opened this issue May 15, 2022 · 3 comments
Labels

Comments

@bigfish1913
Copy link

com.github.sh0nk.matplotlib4j.PythonExecutionException: Python execution error: Traceback (most recent call last):
File "/Users/xxx/Library/Python/3.8/lib/python/site-packages/numpy/core/init.py", line 23, in
from . import multiarray
File "/Users/xxxx/Library/Python/3.8/lib/python/site-packages/numpy/core/multiarray.py", line 10, in
from . import overrides
File "/Users/xxxx/Library/Python/3.8/lib/python/site-packages/numpy/core/overrides.py", line 6, in
from numpy.core._multiarray_umath import (
ImportError: dlopen(/Users/xxxx/Library/Python/3.8/lib/python/site-packages/numpy/core/_multiarray_umath.cpython-38-darwin.so, 0x0002): tried: '/Users/xxxx/Library/Python/3.8/lib/python/site-packages/numpy/core/_multiarray_umath.cpython-38-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/_multiarray_umath.cpython-38-darwin.so' (no such file), '/usr/lib/_multiarray_umath.cpython-38-darwin.so' (no such file)

@sh0nk
Copy link
Owner

sh0nk commented May 16, 2022

@fuwei199006 Thanks for the feedback. Could you also point out which method call on java raised the exception?

@bigfish1913
Copy link
Author

When Java calls Python and imports numpy library . This doesn't seem to be the problem with this component。

#coding=utf-8
import numpy as np
print(1+2)
print("==============")
x = np.array(range(0, 50))
print(x)

Call in Java to try this

@sh0nk
Copy link
Owner

sh0nk commented May 29, 2022

@fuwei199006
Sorry for replying so late. I have finally tried to test on Mac with Apple Silicon. But if numpy is correctly installed with python 3.9, I haven't seen that error. With another Python version, I also struggled to install the library, so please check if numpy is correctly installed first. ref: https://stackoverflow.com/questions/71745890/incompatible-architecture-have-arm64-need-x86-64-error-while-installing

@sh0nk sh0nk added the question label May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants