ninia / jep

Embed Python in Java
Other
1.3k stars 147 forks source link

Mac M1 - have 'arm64', need 'x86_64' #389

Closed ton3r closed 2 years ago

ton3r commented 2 years ago

I've installed JEP on my Mac Pro M1, but during the use of it I got the Exception

java.lang.UnsatisfiedLinkError: /opt/homebrew/lib/python3.9/site-packages/jep/jep.cpython-39-darwin.so: dlopen(/opt/homebrew/lib/python3.9/site-packages/jep/jep.cpython-39-darwin.so, 0x0001): tried: '/opt/homebrew/lib/python3.9/site-packages/jep/jep.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/jep.cpython-39-darwin.so' (no such file)

Environment (please complete the following information):

mbp-m1 ~ % pip install --upgrade jep DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621 Requirement already satisfied: jep in /opt/homebrew/lib/python3.9/site-packages (4.0.0) Collecting jep Downloading jep-4.0.3.tar.gz (3.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 16.0 MB/s eta 0:00:00

Is there a way or a build to use it with Apple Silicon M1?

Thanks for help,

Tom

bsteffensmeier commented 2 years ago

Make sure that your Java installation and Python installation are using a compatible architecture. Based of this error you are using an arm64 version of Python with an x86_64 version of Java. Jep will work with either architecture. Jep is built by Python and loaded by Java so if they are not the same architecture it will not work.

plapa commented 2 years ago

You can also check more details on this issue I opened #379

ton3r commented 2 years ago

Yes! azul in arm version solves my probs! Thanks!