Snappy error config installation

Hi All!
I try install snappy how described here:
When i run: snappy-conf <python-exe> <snappy-dir>, i get error: …

[details=Summary]The launcher has determined that the parent process has a console and will reuse it for its own console output.
Closing the console will result in termination of the running program.
Use ‘–console suppress’ to suppress console output.
Use ‘–console new’ to create a separate console window.
Java HotSpot™ 64-Bit Server VM warning: ignoring option MaxPermSize=384m; support was removed in 8.0
Configuring SNAP-Python interface… Python configuration failed.
Command [c:\ProgramData\Anaconda2\python.exe .\ --snap_home “C:\Program Files\snap” --java_module “C:\Program Files\snap\snap\modules\org-esa-snap-snap-python.jar” --force --log_file .\snappyutil.log --jvm_max_mem 5G --java_home “C:\Program Files\snap\jre” --req_arch amd64]
failed with return code 30.
Please check the log file ‘c:\Users\andre\.snap\snap-python\snappy\snappyutil.log’.
at org.esa.snap.python.PyBridge.configureJpy(
at org.esa.snap.python.PyBridge.installPythonModule(
at org.esa.snap.rcp.cli.SnapArgsProcessor.processPython(
at org.esa.snap.rcp.cli.SnapArgsProcessor.process(
at org.netbeans.modules.sendopts.DefaultProcessor.process(
at org.netbeans.spi.sendopts.Option$1.process(
at org.netbeans.api.sendopts.CommandLine.process(
at org.netbeans.modules.sendopts.HandlerImpl.execute(
at org.netbeans.modules.sendopts.Handler.cli(
at org.netbeans.CLIHandler.notifyHandlers(
at org.netbeans.core.startup.CLICoreBridge.cli(
at org.netbeans.CLIHandler.notifyHandlers(
at org.netbeans.CLIHandler$1.exec(
at org.netbeans.CLIHandler.finishInitialization(
at org.netbeans.MainImpl.finishInitialization(
at org.netbeans.Main.finishInitialization(
at org.netbeans.core.startup.Main.start(
at Source)
Python configuration error: Python configuration failed.
Command [c:\ProgramData\Anaconda2\python.exe .\ --snap_home “C:\Program Files\snap” --java_module “C:\Program Files\snap\snap\modules\org-esa-snap-snap-python.jar” --force --log_file .\snappyutil.log --jvm_max_mem 5G --java_home “C:\Program Files\snap\jre” --req_arch amd64]
failed with return code 30.
Please check the log file ‘c:\Users\andre\.snap\snap-python\snappy\snappyutil.log’.

My PC config :
Win 10
Anaconda2 + python2.7

My snappyutil.log: snappyutil.log (1,4 КБ)
snappy.ini: snappy.ini (216 Байт)

What should I change to properly configure it?

sorry to ask you that but did you type < python-exe > and so on or are they just placeholders in your example?

Of course, these are just placeholders, I did so:

This is how it worked for me: Snappy.ini not found: make new one?

It is a bit different so maybe it helps you.

How do you solve the problem in the end???

Unfortunately, it was not possible to solve this problem. I even tried SNAP version 6.0.

This error means that some library could not be loaded.
It is in a different scenario also mentioned on Stackoverflow
Maybe the error is that you have somehow mixed 32Bit and 64Bit. Maybe your anaconda is 32Bit and SNAP 64Bit? Could this be a reason?

I switched this forum to read-only (except for admins) since SNAP 6.0 official is out. Perhaps this thread should be moved into an active forum?

It seems I was able to solve the problem in windows 10.

I did the following:

1). Install Microsoft Visual Studio 11.0
I have a variable VS110COMNTOOLS

2). Install jdk-9.0.4 and jre-9.0.4

3). set JAVA_HOME=c:\Program Files\Java\jdk-9.0.4
set PATH=PATH;c:\Program Files\Java\jdk-9.0.4\bin

I checked that it works:
java --version

4). Download
Unpack and move in c:\Program Files\

  set PATH=%PATH%;c:\Program Files\apache-maven-3.5.2\bin

 I checked that it works:
 mvn -v

5). Download jpy-master in C:\Users\andre\Downloads\

cd C:\Users\andre\Downloads\jpy-master
python --maven build

I checked that it works:

6). cd c:\Program Files\snap\bin\

7). snappy-conf c:\ProgramData\Anaconda2\python.exe c:\Users\andre\.snap\snap-python\snappy

8). python
import snappy
from snappy import ProductIO

It Works!!!


Thanks for this explanation.
I wonder having Visual Studio is necessary for a windows installation of Snappy? Why?

There is a native part behind. It is called jpy. It is written in C.

It provides the bridge between python and java.

Thank you very much Marco,
Sounds very promising!
I was almost crying when I though I had to install VS.
If you don’t mind I will report issues on the installation of t “jpy” on my Windows and Linux here.

First Question :

Installing snappy (therefore jpy) on Linux Fedora 29 (64x)
Is it necessary to install a specific version of JKD (Is it OK to install the last version 11.0.2 ?)

The same question goes for installing it on windows 10 (64x)

I am trying to follow the procedures that you brought here.
So far I did everything accordingly except the fist step (installing Visual studio)
Instead I installed Microsoft Visual C++ (only because it is lighter than installing the whole VS monster)
But now I am stuck at step 5. It seems to me that it does not recognize the path to the compiler. Bu I also manually added the installation address to the system path. I do not have any clue where to go from here…

I would appreciate any comment on this.
Maybe I should install the whole Visual Studio package after all ?


I have a similar issue with jpy. I have tried (unsuccessfully) many times to install SNAPPY with python 2.7.15 and 3.7.2. I use the SNAP GUI with no problem, but have never had any luck importing jpy or snappy.

MacOS 10.14.3, Mojave

java 11.0.2
Java™ SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot™ 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
($JAVA_HOME = /Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home, $JDK_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home)
Apache Maven 3.6.0 (PATH=/usr/local/Cellar/maven/3.6.0/bin/mvn)

After cloning the jpy repository,
git clone

and running the following line,
python --maven build jpy

I get the following warnings:
src/main/c/jni/org_jpy_PyLib.c:331:9: warning: implicit declaration of function ‘JPy_free’ is invalid in C99
src/main/c/jni/org_jpy_PyLib.c:331:9: warning: this function declaration is not a prototype [-Wstrict-prototypes]
src/main/c/jni/org_jpy_PyLib.c:329:26: warning: unused variable ‘state’ [-Wunused-variable]
PyGILState_STATE state = PyGILState_Ensure();
src/main/c/jni/org_jpy_PyLib.c:791:16: warning: incompatible pointer to integer conversion returning ‘void *’ from a
function with result type ‘jlong’ (aka ‘long’) [-Wint-conversion]
return NULL;
/Applications/ note:
expanded from macro ‘NULL’

define NULL ((void*)0)


src/main/c/jni/org_jpy_PyLib.c:796:101: warning: passing ‘const char *’ to parameter of type ‘void *’ discards qualifiers
result = executeInternal(jenv, jLibClass, jStart, jGlobals, jLocals, (DoRun)pyRunStringWrapper, codeChars);
src/main/c/jni/org_jpy_PyLib.c:657:128: note: passing argument to parameter ‘runArg’ here
…jenv, jclass jLibClass, jint jStart, jobject jGlobals, jobject jLocals, DoRun runFunction, void *runArg) {
src/main/c/jni/org_jpy_PyLib.c:1076:14: warning: incompatible pointer types assigning to ‘PyObject *’
(aka ‘struct _object *’) from 'struct _typeobject ’ [-Wincompatible-pointer-types]
pyObject = ((PyObject
) objId)->ob_type;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.

…and when running
python --maven bdist_wheel

It is successful, but with warnings:

Are you able to help? I’m happy to provide any further information as needed!

Thank you!


I am still trying to fix this issue on my windows machine. Have not so far been successful. However the recent answer of the user WALT-H in this page helped me to install correct VS build tools. I followed all the steps as Andverh suggested and I managed to have everything setup however at the end of step 5 I still can not import jpy. I installed python 2.7 and things are still the same.

Not sure if this is still relevant, but I had exact same error as OP on Azure Ubuntu VM with very low (1GB) RAM. The error was solved by increasing RAM.