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

Installing jep on M1 Machine. With error incompatible architecture (have 'arm64', need 'x86_64')) #379

Closed
plapa opened this issue Mar 2, 2022 · 2 comments

Comments

@plapa
Copy link

plapa commented Mar 2, 2022

Describe the problem
A clear and concise description of what the problem is.

I'm not able to run jep commands on a M1 machine.

Search for existing solutions
The Jep build is automatically tested and confirmed to be working in Linux, OS X, and Windows using Travis and AppVeyor. We cannot possibly test every environment so we rely on the community to document any issues and solutions in other environments. Please search for a similar problem and solution on both the mailing list and the existing closed github issues before opening a new issue.

Environment (please complete the following information):

  • OS Platform, Distribution, and Version: macOS Monterey 12.1 with M1 chip
  • Python Distribution and Version: Miniforge 3.9
  • Java Distribution and Version: Temurin 11
  • Jep Version: 4.0.2
  • Python packages used (e.g. numpy, pandas, tensorflow): Numpy, pandas, scikit-learn, scipy

Logs
Please attach the complete console output of the build.
running jep

produces this output:

java.lang.UnsatisfiedLinkError: /Users/plapa/miniforge3/lib/python3.9/site-packages/jep/jep.cpython-39-darwin.so: dlopen(/Users/plapa/miniforge3/lib/python3.9/site-packages/jep/jep.cpython-39-darwin.so, 0x0001): tried: '/Users/plapa/miniforge3/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)

Additional context
Add any other context about the problem here.

I tried installing jep from Pypy. But also by downloading version 4.0.2 and running the following command:

``
ARCHFLAGS="-arch arm64" python3 setup.py build install

@bsteffensmeier
Copy link
Member

It appears you are using a java built for x86_64 and python built for arm64. Both java and python need to be built for the same architecture to use jep. You will need to acquire an arm64 build of java or an x86_64 build of python and ensure you are using the correct, compatible versions when running jep.

@plapa
Copy link
Author

plapa commented Mar 2, 2022

Thank you so much for the help! Installing a java 11 jdk for aarm64 seems to have solved the problem.

I used this jdk:
https://www.azul.com/downloads/?version=java-11-lts&os=macos&architecture=arm-64-bit&package=jdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants