SNAPPY installation on linux (RedHat 6.9)

I tried to configure the snappy on linux with python 2.7.8 , java 1.8.0_131, and jpy version 0.8.0 (which is installed independently at the system python site-package directory).
However, installation codes are trying (and failing) to install it again from using a binary of wheel inside a jar file. The wheel file includes a jpy.so which is incompatible with the RedHat 6 system (requires a newer glibc).


Running on a RedHat 6.9 (Santiago) system

procyon> which python
/usr/local/python/2.7.8/bin/python
procyon> echo $JAVA_HOME
/afs/glue.umd.edu/software/java/java8/sys
procyon> ls $JAVA_HOME/
COPYRIGHT LICENSE README.html THIRDPARTYLICENSEREADME-JAVAFX.txt* THIRDPARTYLICENSEREADME.txt bin/ db/ include/ javafx-src.zip* jre/ lib/ man/ release src.zip
procyon> python -c ‘import jpy; print jpy.file
/usr/local/python/2.7.8/lib/python2.7/site-packages/jpy-0.8.0-py2.7-linux-x86_64.egg/jpy.so
procyon>
procyon>
procyon> bash ./esa-snap_all_unix_5_0.sh
Unpacking JRE …
Preparing JRE …
Starting Installer …

[SNAP Setup Wizard]
Welcome screen page:
click next
License Agreement page:
accept, click next
SNAP User Data Page:
Yes, try deleting all SNAP user data
click next
Select Destination Directory page
/homes/payerle/localhome/esa-snap/test-install
click next
Popup: Directory already exists:
install anyway: yes
Select Components page
(just keep with defaults)
click next
Select Directory for Symlinks page
/homes/payerle/localhome/esa-snap/test-symlinks
click next
Select Python page
check Configure SNAP for use with python
Python executable: /usr/local/python/2.7.8/bin/python
next

Installing
Completing page:
click finish

[splash screen shows up for about 1 minute, then goes away. No errors, etc. reported
to command line, etc]
However,
~/.snap/snap-python/snappy/snappyutil.log has the following:
INFO: Installing from Java module ‘/homes/payerle/localhome/esa-snap/test-install/snap/modules/org-esa-snap-snap-python.jar’
WARNING: Architecture requirement possibly not met: Python is x86_64 but JVM requires amd64
INFO: Installing jpy…
INFO: Extracting ‘lib/jpy-0.8.0-cp27-none-linux_x86_64.whl’ from ‘/homes/payerle/localhome/esa-snap/test-install/snap/modules/org-esa-snap-snap-python.jar’
INFO: Unzipping ‘/afs/glue.umd.edu/home/glue/p/a/payerle/home/.snap/snap-python/snappy/lib/jpy-0.8.0-cp27-none-linux_x86_64.whl’
INFO: Configuring jpy…
INFO: jpy Python API configuration written to ‘/afs/glue.umd.edu/home/glue/p/a/payerle/home/.snap/snap-python/snappy/jpyconfig.py’
INFO: jpy Java API configuration written to ‘/afs/glue.umd.edu/home/glue/p/a/payerle/home/.snap/snap-python/snappy/jpyconfig.properties’
INFO: Configuring snappy…
INFO: snappy configuration written to ‘/afs/glue.umd.edu/home/glue/p/a/payerle/home/.snap/snap-python/snappy/snappy.ini’
INFO: Importing snappy for final test…
ERROR: Configuration failed
Traceback (most recent call last):
File “./snappyutil.py”, line 261, in _main
force=args.force)
File “./snappyutil.py”, line 210, in _configure_snappy
import(‘snappy’)
File “/afs/glue.umd.edu/home/glue/p/a/payerle/home/.snap/snap-python/snappy/…/snappy/init.py”, line 64, in
import jpy
ImportError: /lib64/libc.so.6: version GLIBC_2.14' not found (required by /afs/glue.umd.edu/home/glue/p/a/payerle/home/.snap/snap-python/snappy/../snappy/jpy.so) If I then run procyon> ./snappy-conf /usr/local/python/2.7.8/bin/python Configuring SNAP-Python interface... java.io.IOException: Python configuration failed. Command [/usr/local/python/2.7.8/bin/python ./snappyutil.py --snap_home /export/data/localhome/home/payerle/esa-snap/test-install2 --java_module /export/data/localhome/home/payerle/esa-snap/test-install2/snap/modules/org-esa-snap-snap-python.jar --force --log_file ./snappyutil.log --java_home /export/data/localhome/home/payerle/esa-snap/test-install2/jre --req_arch amd64] failed with return code 30. Please check the log file '/homes/payerle/.snap/snap-python/snappy/snappyutil.log'. at org.esa.snap.python.PyBridge.configureJpy(PyBridge.java:223) at org.esa.snap.python.PyBridge.installPythonModule(PyBridge.java:147) at org.esa.snap.rcp.cli.SnapArgsProcessor.processPython(SnapArgsProcessor.java:103) at org.esa.snap.rcp.cli.SnapArgsProcessor.process(SnapArgsProcessor.java:49) at org.netbeans.modules.sendopts.DefaultProcessor.process(DefaultProcessor.java:202) at org.netbeans.spi.sendopts.Option$1.process(Option.java:387) at org.netbeans.api.sendopts.CommandLine.process(CommandLine.java:317) at org.netbeans.modules.sendopts.HandlerImpl.execute(HandlerImpl.java:62) at org.netbeans.modules.sendopts.Handler.cli(Handler.java:69) at org.netbeans.CLIHandler.notifyHandlers(CLIHandler.java:234) at org.netbeans.core.startup.CLICoreBridge.cli(CLICoreBridge.java:82) at org.netbeans.CLIHandler.notifyHandlers(CLIHandler.java:234) at org.netbeans.CLIHandler$1.exec(CLIHandler.java:268) at org.netbeans.CLIHandler.finishInitialization(CLIHandler.java:447) at org.netbeans.MainImpl.finishInitialization(MainImpl.java:256) at org.netbeans.Main.finishInitialization(Main.java:92) at org.netbeans.core.startup.Main.start(Main.java:316) at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123) at java.lang.Thread.run(Thread.java:745) Python configuration error: Python configuration failed. Command [/usr/local/python/2.7.8/bin/python ./snappyutil.py --snap_home /export/data/localhome/home/payerle/esa-snap/test-install2 --java_module /export/data/localhome/home/payerle/esa-snap/test-install2/snap/modules/org-esa-snap-snap-python.jar --force --log_file ./snappyutil.log --java_home /export/data/localhome/home/payerle/esa-snap/test-install2/jre --req_arch amd64] failed with return code 30. Please check the log file '/homes/payerle/.snap/snap-python/snappy/snappyutil.log' With snappyutil.log again containing INFO: Installing from Java module '/export/data/localhome/home/payerle/esa-snap/test-install2/snap/modules/org-esa-snap-snap-python.jar' WARNING: Architecture requirement possibly not met: Python is x86_64 but JVM requires amd64 INFO: Installing jpy... INFO: Extracting 'lib/jpy-0.8.0-cp27-none-linux_x86_64.whl' from '/export/data/localhome/home/payerle/esa-snap/test-install2/snap/modules/org-esa-snap-snap-python.jar' INFO: Unzipping '/afs/glue.umd.edu/home/glue/p/a/payerle/home/.snap/snap-python/snappy/lib/jpy-0.8.0-cp27-none-linux_x86_64.whl' INFO: Configuring jpy... INFO: jpy Python API configuration written to '/afs/glue.umd.edu/home/glue/p/a/payerle/home/.snap/snap-python/snappy/jpyconfig.py' INFO: jpy Java API configuration written to '/afs/glue.umd.edu/home/glue/p/a/payerle/home/.snap/snap-python/snappy/jpyconfig.properties' INFO: Configuring snappy... INFO: snappy configuration written to '/afs/glue.umd.edu/home/glue/p/a/payerle/home/.snap/snap-python/snappy/snappy.ini' INFO: Importing snappy for final test... ERROR: Configuration failed Traceback (most recent call last): File "./snappyutil.py", line 261, in _main force=args.force) File "./snappyutil.py", line 210, in _configure_snappy __import__('snappy') File "/afs/glue.umd.edu/home/glue/p/a/payerle/home/.snap/snap-python/snappy/../snappy/__init__.py", line 64, in <module> import jpy ImportError: /lib64/libc.so.6: versionGLIBC_2.14’ not found (required by /afs/glue.umd.edu/home/glue/p/a/payerle/home/.snap/snap-python/snappy/…/snappy/jpy.so)

Is there a way to force the scripts/codes to use the system installed jpy package?
Is there a way/are there instructions to install the python component manually (without using the scripts/codes)?

If you have further questions/ comments about the our problem, please feel free to send me a email.

Thank you
Jongmin Park

There has been a similar question in the past.


Maybe the links help you!?

1 Like

Thank you for responses

But our main problem is that despite the fact that jpy is ALREADY installed in the system python
site-packages directory, the installation codes are trying (and failing) to install it again from using a binary a wheel file inside a jar file. The wheel file includes a jpy.so which is incompatible with the RedHat 6 system (requires a newer glibc).

Is there a way to force the scripts/codes to use the system installed jpy package?
Is there a way/are there instructions to install the python component manually (without
using the scripts/codes)?

Thank you

Jongmin

The binary installer’s wheel files aren’t compatible with macOS El Capitan. The resulting snappyutil.log has:

INFO: Installing from Java module '/Users/snap/Applications/snap6/snap/modules/org-esa-snap-snap-python.jar'
INFO: Installing jpy... 
ERROR: The module 'jpy' is required to run snappy, but no binary 'jpy' wheel matching the pattern
ERROR: 'jpy-{version}-cp27-{abi_tag}-macosx_10_11_x86_64.whl' could be found.
You can try to build a 'jpy' wheel yourself and then copy it into
"/Users/snap/.snap/snap-python/snappy" and then run the configuration again.
Please go to https://github.com/bcdev/jpy and follow the build instructions. E.g.
 > git clone https://github.com/bcdev/jpy.git
 > cd jpy
 > python setup.py bdist_wheel
 > cp dist/*.whl "/Users/snap/.snap/snap-python/snappy"
ERROR: Configuration failed

Since python setup.py install worked for jpy on your system, there is good
chance that python setup.py bdist_wheel also works.

As jpy is already installed on your system you can try to install the snappy scripts manually as follows. I haven’t tried it myself, so I don’t know if it works at the end, but chances are good.

Install SNAP without configuring it for Python.
Within the SNAP installation you have the snap/modules directory. Inside this directory you find the org-esa-snap-snap-python.jar file extract it and copy the snappy folder into the site-packages folder of your python instance.
Within the extracted snappy folder you need to create a snappy.ini file (snappy.ini (211 Bytes)
). Adapt the path and the memory settings.

Can anyone help me out with how to solve the below error. I get this error trying to install SNAPPY

p = ProductIO.readProduct(’/home/asili/.snap/snap-python/snappy/testdata/MER_FRS_L1B_SUBSET.dim’)
list(p.getBandNames())
Traceback (most recent call last):

File “”, line 1, in
p = ProductIO.readProduct(’/home/asili/.snap/snap-python/snappy/testdata/MER_FRS_L1B_SUBSET.dim’)

RuntimeError: java.lang.NoSuchMethodError: org.esa.snap.engine_utilities.gpf.ReaderUtils.getPathFromInput(Ljava/lang/Object;)Ljava/nio/file/Path;