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’.
I don’t think this is the correct one - it probably refers to this one: python-snappy · PyPI
So I would first delete this from the environment in a first step.
As @ABraun mentioned, you have encountered one of the many Python packages named “snappy” that are not from ESA SNAP. The link to the ESA SNAP Python interface (also called “snappy”) mentions several ways to import ESA SNAP snappy. For most users, it is best to "append <snappy-dir> to the sys.path variable in your Python code before importing snappy". If you install ESA SNAP snappy to site-packages other python programs that expect one of the other snappy modules may fail. By appending <snappy-dir> to the sys.path variable in your Python code you are making it clear to anyone who looks at your code that you code requires ESA SNAP snappy.
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ESA SNAP
Is this the path for snappy?
For appending <snappy-dir> to the sys.path variable in Python code, I need to know the path of snappy-dir, So where can I find it.
Please post error messages as text – screen captures can’t be searched are used to cut and paste.
If you are planning to use python you will need to learn the language. Python treats a \ as an “escape” character, so you need to replace \ with \\. You can usually use a forward (/) slash as the separator in paths (but beware of cases where the path is passed to Windows). Python code is quite portable across
Windows, Linux, and macOS, so it is generally best to use / as a path separator.
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: Python configuration failed.
Command [F:\Python\Anaconda_3.0\envs\snap_env_v36\python.exe .\snappyutil.py --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\jre” --req_arch amd64]
failed with return code 30.
Please check the log file ‘C:\Users\Suchitra.snap\snap-python\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 [F:\Python\Anaconda_3.0\envs\snap_env_v36\python.exe .\snappyutil.py --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\jre” --req_arch amd64]
failed with return code 30.
Please check the log file ‘C:\Users\Suchitra.snap\snap-python\snappy\snappyutil.log’.
Any help to solve the issue is highly appreciable.