Configure snappy on M2 mac

I am trying to configure snappy on a M2 mac

After I built the jpy wheel and run
./snappy-conf /Users/dun_wang/opt/miniconda3/envs/snap/bin/python3 /Users/dun_wang/opt/miniconda3/envs/snap/lib/python3.8/site-packages/

this is what in the snappyutil.log

INFO: Installing from Java module '/Applications/snap/snap/modules/org-esa-snap-snap-python.jar'

WARNING: Architecture requirement possibly not met: Python is arm64 but JVM requires x86_64

INFO: Installing jpy...

INFO: Unzipping '/Users/dun_wang/opt/miniconda3/envs/snap/lib/python3.8/site-packages/snappy/jpy-0.14.0.dev0-cp38-cp38-macosx_11_1_arm64.whl'

INFO: Configuring jpy...

INFO: jpy Python API configuration written to '/Users/dun_wang/opt/miniconda3/envs/snap/lib/python3.8/site-packages/snappy/jpyconfig.py'

INFO: jpy Java API configuration written to '/Users/dun_wang/opt/miniconda3/envs/snap/lib/python3.8/site-packages/snappy/jpyconfig.properties'

INFO: Configuring snappy...

INFO: snappy configuration written to '/Users/dun_wang/opt/miniconda3/envs/snap/lib/python3.8/site-packages/snappy/snappy.ini'

INFO: Importing snappy for final test...

ERROR: Configuration failed with exit code 30

I tried to import snappy in the python and got:
OSError: dlopen(/Applications/snap/.install4j/jre.bundle/Contents/Home/lib/server/libjvm.dylib, 0x000A): tried: '/Applications/snap/.install4j/jre.bundle/Contents/Home/lib/server/libjvm.dylib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))

It looks the problem is that libjvm.dylib is built for x86_64, does anyone know how fix this issue. Thanks

SNAP is not shipped with a Java VM for ARM chips.

Please have a look at this thread for a workaround:
SNAP headless on ARM - snap - STEP Forum (esa.int)

Just now a new post showed up in that thread saying it is still not working.

Please search this forum for the above error. The WARNING: Architecture requirement possibly not met: Python is arm64 but JVM requires x86_64 message does not cause error 30.

1 Like

Hello
SNAP does not include a Java VM for ARM chips. If you’re looking for a workaround, you can refer to this thread for more information: SNAP headless on ARM - snap - STEP Forum (esa.int)

This comment provides a concise summary of the issue and directs the reader to the relevant resource for a solution.

Advertisement deleted from @stevediaz 's post and account silenced for 5 days.

1 Like

Does anyone have a solution for this issue?
I am also unable to configure snappy for SNAP on Mac.