Problem with snappy instalation

Hello,
I am new to snappy module in Linux and I am having troubles with installation. After executing command ./snappy-conf /usr/bin/python3.6 I get this error.

Configuring SNAP-Python interface…
java.io.IOException: Python configuration failed.
Command [/usr/bin/python3.6 ./snappyutil.py --snap_home /home/lubomir/snap --java_module /home/lubomir/snap/snap/modules/org-esa-snap-snap-python.jar --force --log_file ./snappyutil.log --jvm_max_mem 3G --java_home /home/lubomir/snap/jre --req_arch amd64]
failed with return code 30.
Please check the log file ‘/home/lubomir/.snap/snap-python/snappy/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:745)
Python configuration error: Python configuration failed.
Command [/usr/bin/python3.6 ./snappyutil.py --snap_home /home/lubomir/snap --java_module /home/lubomir/snap/snap/modules/org-esa-snap-snap-python.jar --force --log_file ./snappyutil.log --jvm_max_mem 3G --java_home /home/lubomir/snap/jre --req_arch amd64]
failed with return code 30.
Please check the log file ‘/home/lubomir/.snap/snap-python/snappy/snappy/snappyutil.log’.

Here is a snappyutil.log …
INFO: Installing from Java module ‘/home/lubomir/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: Configuration failed
Traceback (most recent call last):
File “./snappyutil.py”, line 266, in _main
force=args.force)
File “./snappyutil.py”, line 96, in _configure_snappy
import distutils.util
ModuleNotFoundError: No module named ‘distutils.util’

Any idea how to solve this ? Thank you very much.

As snappy wasn’t build for Python 3.6 I would say it is better to stick to Python 3.4.
I don’t know if the problem comes from a version conflict but it is better to use the recommended and tested version.

Hello,

So I have reinstalled python to version 3.4.8 and the problem still persists. Any suggestions ?

Which Linux are you using?
I’m asking because I found other posts which read similarly.
https://bugs.launchpad.net/ubuntu/+source/fdroidserver/+bug/1762183
This question arises for the first time, too. Maybe the problem is not related to snappy.

I am using Ubuntu 18.04.

So I have managed to successfully install Snappy module. However, after calling “1st contact” command, I am getting this error. I have been searching on forum, but haven’t found similar problem. I am using Python3.6 and Ubuntu 18.04.

from snappy import ProductIO
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python3.6/dist-packages/snappy/init.py”, line 7, in
from .SnapPy import (AbelianGroup, HolonomyGroup, FundamentalGroup,
File “cython/core/basic.pyx”, line 45, in init SnapPy
File “/usr/local/lib/python3.6/dist-packages/snappy/horoviewer.py”, line 3, in
from .CyOpenGL import *
File “opengl/CyOpenGL.pyx”, line 36, in init CyOpenGL
AttributeError: type object ‘CyOpenGL.vector3’ has no attribute ‘reduce_cython

Thank you very much for any guesses.

I have solved this problem by installing snappy on python2.7. Snappy module is successfully loaded now and I was able to call

from snappy import ProductIO

command. After calling It I get an error (probably something to do with GDAL libraries). Here’s an error after calling python script:

python /home/lubomir/Desktop/snappy_1st.py
INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
SEVERE: org.esa.s2tbx.dataio.gdal.activator.GDALDistributionInstaller: The environment variable LD_LIBRARY_PATH is not set. It must contain the current folder ‘.’.
INFO: org.hsqldb.persist.Logger: dataFileCache open start

I’ve installed GDAL but might configure it a bit, any help ?