ModuleNotFoundError: No module named ‘esa_snappy’

C:\Users\aksha>cd C:\Program Files\esa-snap



The launcher has determined that the parent process has a console and will reuse it for its own console output.
Use '--console suppress' to suppress console output.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory (file:/C:/Program%20Files/esa-snap/platform/lib/boot.jar) to field java.net.URL.handler
WARNING: Please consider reporting this to the maintainers of org.netbeans.ProxyURLStreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Configuring ESA SNAP-Python interface...
Configuration finished successful!
Done. The SNAP-Python interface is located in 'C:\Users\aksha\.snap\snap-python\esa_snappy'
When using SNAP from Python, either do: sys.path.append('C:\\Users\\aksha\\.snap\\snap-python')
or copy the 'esa_snappy' module into your Python's 'site-packages' directory.
The executable of the Python environment is located at 'C:\Python310\python.exe'
C:\Program Files\esa-snap>cd C:\Users\aksha\.snap\snap-python\esa_snappy

C:\Users\aksha\.snap\snap-python\esa_snappy>python.exe
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from esa_snappy import ProductIO
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'esa_snappy'

To solve this I went through all the previous solutions. In fact I also followed this document and got this error.

Hello,

I think that the problem is that you are into the esa_snappy folder.

You will need to initialize the python.exe on C:\Users\aksha.snap\snap-python\

If you want to execute it from another directory, you must follow the instructions that the log provide you:

When using SNAP from Python, either do: sys.path.append('C:\\Users\\aksha\\.snap\\snap-python')
or copy the 'esa_snappy' module into your Python's 'site-packages' directory.

Regards,

Álvaro

1 Like

Thank you so much!!

1 Like