ninia / jep

Embed Python in Java
Other
1.27k stars 146 forks source link

Failure on Apple Silicon with arm64-only Python #423

Open conwaytext opened 1 year ago

conwaytext commented 1 year ago

When I run the Hello World example, I get different results depending on the Python binary I use.

It looks like the Jep lib output by pip install jep is universal when using a universal Python binary, and arm64-only when using an arm64-only Python binary. That seems straightforward enough, but I have no idea why an arm64-only lib / interpreter is problematic since I'm using an arm64-only JVM. So I think, at least.

> file (asdf which java)
/Users/conway/.asdf/installs/java/temurin-11.0.16+101/bin/java: Mach-O 64-bit executable arm64

Things I tried that didn't work:

I only got it to work after switching to a build from python.org. The python.org builds seem to be Universal 2, while the pyenv and asdf-vm builds are arm64-only.

This is on macOS 12.5.1, using Jep 4.0.3 and no Python packages outside of the stdlib. I'm guessing there are a million other variables at play, apologies if I missed any or this has nothing to do with arch after all.

bsteffensmeier commented 1 year ago

Unfortunatly I do not have access to a Mac so there is not much troubleshooting I can do, Previous reports of mac architecture issues(#379, #389) have reported success on arm64 so check thiose issues for any relevant info.