Linux Difficulty in loading snappy modules

kemiy

Member
Hello Marpet,
I have a windows 10 operating system with 8 GB RAM, with Anaconda 3.7 version installed on my computer. I installed snappy using conda command, but running the following command shows import error:

from snappy import ProductIO gives an error.

ImportError: cannot import name ‘ProductIO’ from ‘snappy’ (F:\Python\Anaconda_3.0\envs\gdal_env\lib\site-packages\snappy_init_.py)

After going through topics related to snappy in step forum, I reinstalled SNAP software with python 3.6 version.Then in the SNAP command line, I gave the following command-
**snappy-conf.bat F:\python3.6\python-3.6.0.exe

and the following errors were displayed.

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.
Configuring SNAP-Python interface…
java.io.IOException: SNAP-Python configuration incomplete.
Missing file ‘C:\Users\Such.snap\snap-python\snappy\jpyconfig.properties’.
Please check the log file ‘C:\Users\Such.snap\snap-python\snappy\snappyutil.log’.
at org.esa.snap.python.PyBridge.installPythonModule(PyBridge.java:152)
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: SNAP-Python configuration incomplete.
Missing file ‘C:\Users\Such.snap\snap-python\snappy\jpyconfig.properties’.
Please check the log file ‘C:\Users\Such.snap\snap-python\snappy\snappyutil.log’.
 
Hello Marpet,
I have a windows 10 operating system with 8 GB RAM, with Anaconda 3.7 version installed on my computer. I installed snappy using conda command, but running the following command shows import error:

from snappy import ProductIO gives an error.

ImportError: cannot import name ‘ProductIO’ from ‘snappy’ (F:\Python\Anaconda_3.0\envs\gdal_env\lib\site-packages\snappy_init_.py)

After going through topics related to snappy in step forum, I reinstalled SNAP software with python 3.6 version.Then in the SNAP command line, I gave the following command-
**snappy-conf.bat F:\python3.6\python-3.6.0.exe

and the following errors were displayed.

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 codingspell.
Use ‘–console suppress’ to suppress console output.
Use ‘–console new’ to create a separate console window.
Configuring SNAP-Python interface…
java.io.IOException: SNAP-Python configuration incomplete.
Missing file ‘C:\Users\Such.snap\snap-python\snappy\jpyconfig.properties’.
Please check the log file ‘C:\Users\Such.snap\snap-python\snappy\snappyutil.log’.
at org.esa.snap.python.PyBridge.installPythonModule(PyBridge.java:152)
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: SNAP-Python configuration incomplete.
Missing file ‘C:\Users\Such.snap\snap-python\snappy\jpyconfig.properties’.
Please check the log file ‘C:\Users\Such.snap\snap-python\snappy\snappyutil.log’.
How can I solve this issue. Thank you
 
Hi Such,

It seems like there are a couple of issues that you are facing related to importing the 'ProductIO' module from snappy and configuring the SNAP-Python interface.

Regarding the first issue, the import error occurs because the 'ProductIO' module is not found in the snappy package. This can happen if the module is not installed or if there was an installation problem. To check if the snappy package is installed correctly, you can run the command `conda list` in your Anaconda prompt to see if the snappy package is listed. If it's not listed, you can try reinstalling it using the command `conda install -c conda-forge snappy`.

If the package is listed, you can try uninstalling and reinstalling it to make sure it's installed properly. You can use the following commands:

```
conda remove snappy
conda clean --all
conda install -c conda-forge snappy
```

After reinstalling, try importing the 'ProductIO' module again and see if the error persists.

Now, coming to the second issue, it seems like there is an incomplete configuration of the SNAP-Python interface. The error message suggests that the file 'jpyconfig.properties' is missing. This file is essential for configuring the interface.

To resolve this, you can try running the 'snappy-conf.bat' script again, but this time, make sure to provide the correct path to the Python executable. It seems like you tried providing the path to Python 3.6, but it couldn't find the necessary configuration file. Make sure that the path you provide is correct and that the file 'jpyconfig.properties' exists in the specified location.

If the issue persists, you can try reinstalling the SNAP software again, making sure to provide the correct path to the Python executable during the installation process.

I hope this helps! Let me know if you have any further questions.
 
Hi Such,

It seems like there are a couple of issues that you are facing related to importing the 'ProductIO' module from snappy and configuring the SNAP-Python interface.

Regarding the first issue, the import error occurs because the 'ProductIO' module is not found in the snappy package. This can happen if the module is not installed or if there was an installation problem. To check if the snappy package is installed correctly, you can run the command `conda list` in your Anaconda prompt to see if the snappy package is listed. If it's not listed, you can try reinstalling it using the command `conda install -c conda-forge snappy`.

If the package is listed, you can try uninstalling and reinstalling it to make sure it's installed properly. You can use the following commands:

```
conda remove snappy
conda clean --all
conda install -c conda-forge snappy
```

After reinstalling, try importing the 'ProductIO' module again and see if the error persists.

Now, coming to the second issue, it seems like there is an incomplete configuration of the SNAP-Python interface. The error message suggests that the file 'jpyconfig.properties' is missing. This file is essential for configuring the interface.

To resolve this, you can try running the 'snappy-conf.bat' script again, but this time, make sure to provide the correct path to the Python executable. It seems like you tried providing the path to Python 3.6, but it couldn't find the necessary configuration file. Make sure that the path you provide is correct and that the file 'jpyconfig.properties' exists in the specified location.

If the issue persists, you can try reinstalling the SNAP software again, making sure to provide the correct path to the Python executable during the installation process. Exploring the market for Houses for sale in Lebanon? Discover the beauty of Lebanon's real estate landscape and find your dream home today.

I hope this helps! Let me know if you have any further questions.
yup. this helps a lot. thank you so much
 
Back
Top