Skip to content

Help installing esa_snappy #2

Description

@jeffdiamonddw

I have been trying to install esa_snappy for a number of days with no success so far. I need help please. details are below.
I have also tried python3.7 and various other things such as using pip to install jpy .

If anyone can help me or provide a script that works I would be very very grateful!

Thankyou!

Jeff Diamond

**************************I began with this ubuntu on an aws ec2 instance:
ubuntu@ip-172-31-15-21:~/snap/bin$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy

**************************Then ran the following script:
#install python tools
sudo apt update
sudo apt-get install -y -o DPkg::Options::=--force-confdef cmake python3-dev python3-pip

#install java
cd ~
wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.deb -O jdk-21_linux-x64_bin.deb
sudo apt-get install -y ./jdk-21_linux-x64_bin.deb
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk-21-oracle-x64/bin/java" 2
sudo update-alternatives --set java /usr/lib/jvm/jdk-21-oracle-x64/bin/java
export JDK_HOME=$(java -XshowSettings:properties -version 2>&1 | grep "java.home" | tr -s ' ' | cut -d' ' -f4)
echo export "JDK_HOME=$JDK_HOME" >> ~/.bashrc
echo export "JAVA_HOME=$JDK_HOME" >> ~/.bashrc
source ~/.bashrc

#install snap
cd
wget https://download.esa.int/step/snap/9.0/installers/esa-snap_sentinel_unix_9_0_0.sh -O /home/ubuntu/esa-snap_sentinel_unix_9_0_0.sh
chmod a+x /home/ubuntu/esa-snap_sentinel_unix_9_0_0.sh
/home/ubuntu/esa-snap_sentinel_unix_9_0_0.sh
echo 'export SNAP_HOME=/home/ubuntu/snap' >> ~/.bashrc
source ~/.bashrc

#install jpy
sudo apt install maven
git clone https://github.com/jpy-consortium/jpy.git
cd jpy
python3 setup.py bdist_wheel
find /home/ubuntu/jpy/dist/ -name *.whl | xargs -I{} cp {} /home/ubuntu/.local/lib/python3.7/site-packages/snappy
export LD_LIBRARY_PATH=/home/ubuntu/snap/jre/jre/lib/amd64/server/

#configure snappy
cd /home/ubuntu/snap/bin
./snappy-conf /usr/bin/python3 /home/ubuntu/.local/lib/python3.10/site-packages/

************************ ***********************I get this error
ubuntu@ip-172-31-15-21:~/snap/bin$ ./snappy-conf /usr/bin/python3 /home/ubuntu/.local/lib/python3.10/site-packages/
/home/ubuntu/snap/bin/../platform/lib/nbexec: WARNING: environment variable DISPLAY is not set
Configuring SNAP-Python interface...
java.io.IOException: Python configuration failed.
Command [/usr/bin/python3 ./snappyutil.py --snap_home /home/ubuntu/snap --java_module /home/ubuntu/snap/snap/modules/org-esa-snap-snap-python.jar --force --log_file ./snappyutil.log --jvm_max_mem 10G --java_home /home/ubuntu/snap/jre/jre --req_arch amd64]
failed with return code 10.
Please check the log file '/home/ubuntu/.local/lib/python3.10/site-packages/snappy/snappyutil.log'.
at org.esa.snap.python.PyBridge.configureJpy(PyBridge.java:232)
at org.esa.snap.python.PyBridge.installPythonModule(PyBridge.java:149)
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:748)
Python configuration error: Python configuration failed.
Command [/usr/bin/python3 ./snappyutil.py --snap_home /home/ubuntu/snap --java_module /home/ubuntu/snap/snap/modules/org-esa-snap-snap-python.jar --force --log_file ./snappyutil.log --jvm_max_mem 10G --java_home /home/ubuntu/snap/jre/jre --req_arch amd64]
failed with return code 10.
Please check the log file '/home/ubuntu/.local/lib/python3.10/site-packages/snappy/snappyutil.log'.

******************************************* and this is the resulting log file
ubuntu@ip-172-31-15-21:~/snap/bin$ cat /home/ubuntu/.local/lib/python3.10/site-packages/snappy/snappyutil.log
INFO: Installing from Java module '/home/ubuntu/snap/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...
ERROR: The module 'jpy' is required to run snappy, but no binary 'jpy' wheel matching the pattern
'jpy-{version}-cp310-{abi_tag}-linux_x86_64.whl' could be found.
You can try to build a 'jpy' wheel yourself, then copy it into
"/home/ubuntu/.local/lib/python3.10/site-packages/snappy", and then run the configuration again.
Unzip the jpy sources in /home/ubuntu/.local/lib/python3.10/site-packages/snappy/jpy-.zip, then
$ cd jpy-
$ python setup.py bdist_wheel
$ cp dist/*.whl "/home/ubuntu/.local/lib/python3.10/site-packages/snappy"
Or get the source code from https://github.com/bcdev/jpy and follow the build instructions:
$ git clone https://github.com/bcdev/jpy.git
$ cd jpy
ERROR: Configuration failed with exit code 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions