Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Installation of the esa_snappy plugin

The esa_snappy plugin is one of the ‘internal’ SNAP plugins which are automatically installed during the SNAP installation. Thus, no further user action is required.

Note: Due to a technical restriction in the installation procedure of the latest SNAP version 11, the esa_snappy plugin is not automatically installed. Instead, in SNAP 11 it must be installed like an external plugin via the Plugin Manager in SNAP Desktop:

  • Open the Plugin Manager in SNAP Desktop (Tools → Plugins in the main menu bar)

  • Select tab ‘Available Plugins’. Among others, the plugin ‘ESA SNAPPY’ appears in the list

  • Select ‘ESA SNAPPY’, click ‘Install’, and follow the installation steps as described in the dialogs.

  • After restart of SNAP Desktop, ‘ESA SNAPPY’ will be visible in the list of installed plugins.

Configuration of esa_snappy from the Command Line

Open With the esa_snappy plugin being installed, open a command line window (shell, terminal window on Unixes, cmd on Windows) at the bin folder of the SNAP installation directory. Now type

...

This will generate the Python module esa_snappy configured for the current SNAP installation and your Python interpreter <python-exe> into the .snap/snap-pythondirectory of the user home directory. The parameter <python-exe> must be the full path to the Python interpreter executable which you want to use with SNAP (supported versions are . For Windows users, we recommend that the path to the Python interpreter executable should NOT contain empty spaces (such as in ‘C:\Program Files\…’). The configuration of esa_snappy via GUI during SNAP installation (see below) does not work in this case. Moreover, Python distributions such as Miniconda do not recommend this either because of potential problems.

Supported Python versions are currently 2.7, 3.3 to 3.10, we recommend to use a fairly recent version).  . For the next SNAP major release it is planned to support Python versions up to 3.12.

If you want the esa_snappy module to be placed somewhere else use:

...

$ snappy-conf <python-exe> <esa_snappy-dir>

For example, <esa_snappy-dir> could be the ..\Lib\site-packages folder of your Python installation. In this case, esa_snappy would be already on your Python path (no further sys.path.append … required).

When you see as output something like below, the configuration was successful:

...

This issue has been observed while trying to configure esa_snappy on Windows as described above. The output of snappy-conf may look like this:

Configuring ESA SNAP-Python interface...

...

The reason for this could be that you have permanent environment variables PYTHONHOME and PYTHONPATH set and pointing to a Python installation different to the one which you are trying to use with esa_snappy. If not ultimately needed, we recommend not to use PYTHONHOME and PYTHONPATH.

The same kind of error (empty stack trace) has been observed by Windows users who installed SNAP 10 in a folder which contains empty spaces (such as in ‘C:\Program Files\…’). This issue has been fixed with esa_snappy module update 10.0.1.

In any case of an empty stack trace, Windows users should have a look at the log files in

<user home>\AppData\Roaming\SNAP\var\log

which may contain further helpful information.

Configuration failed with exit code 30

...

when doing `import jpy` within your Python script. Again, the shared library for the JVM cannot be found. This might happen if the LD_LIBRARY_PATH has previously been set correctly, but was changed or not set permanently. In this case, set the LD_LIBRARY_PATH as described above and restart your Python script.

Configuration on MacOS ARM platforms

The configuration of esa_snappy may fail on certain MacOS platforms with ARM architecture. The reason is that, depending on the operating system, specific shared libraries for the JVM are not yet available or not suitable. Users who are affected should report their problem in the SNAP forum. In certain cases, a workaround might be found.

Configuration of esa_snappy during SNAP installation

During the SNAP installation, a dedicated screen for the Python configuration will appear. Follow the instructions given there. Note that at the end of the installation SNAP Desktop must once be opened (by default this is automatically done) to finally activate the Python configuration.

Note: This option is not available in the latest SNAP version 11, as the esa_snappy plugin has not yet been installed at this stage (see above). As a SNAP 11 user, please configure esa_snappy from the command line as described above.

Configuration of esa_snappy from GUI

...