From snappy import ProductIO


#1

I am trying to run a simple script to read sentinel data and begin with some basic band math.

The first line of my code is:
from snappy import ProductIO

I am running SNAP version 6 on my system and using Spyder in Aanconda to run the script.

Post running the script I am getting this error which says:
ImportError: No module named snappy

Can anybody please help me out of this issue.

Regards
Arnab


#2

Have you already run the snappy/python configuration, either during installation or later?
You can have a look at this guide what is necessary to get snappy running:
https://senbox.atlassian.net/wiki/spaces/SNAP/pages/50855941/Configure+Python+to+use+the+SNAP-Python+snappy+interface


#3

While installing SNAP I have given the path of the python.exe as
C:\Users\Computer Name\Anaconda2\python.exe

When I try to run
snappy-conf “C:\Users\Computer Name\Anaconda2\python.exe”

I get an error which says
Python configuration error: Python configuration failed.
Command [“C:\Users\Computer Name\Anaconda2\python.exe” .\snappyutil.py --snap_home C:\PROGRA~1\snap --java_module “C:\Program Files\snap\snap\modules\org-esa-snap-snap-python.jar” --force --log_file .\snappyutil.log --jvm_max_mem 22G --java_home C:\PROGRA~1\snap\jre --req_arch amd64]
failed with return code 30.
Please check the log file ‘C:\Users\Computer Name\ .snap\snap-python\snappy\snappyutil.log’.