Python configuration error while configuring snappy

Dear all,
I’ve been trying to use snap with python 3.9.12 in Jupyter notebook. Tried using python 3.4 and all excercise went in vain. After a week’s futile exercise. Now again installed python 3.9.12 and while trying this, the error is like this in SNAP command line:
snappy-conf C:\Users\HP\anaconda3\envs\snap\python.exe C:\Users\HP\anaconda3\envs\snap\Lib\site-packages

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.
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=384m; support was removed in 8.0
Python configuration internal error: org/esa/snap/core/util/Debug

Please suggest, why there is a confusion while installing snap and configuring snappy? Although, I installed snap this time in the same environment, I created in anaconda.

SNAP bundles jpy for older python versions, so you need to provide a jpy binary wheel that matches your python version. Please see: Out-of-the-box support on Python 3.7 or above for snappy after Python 3.6 End of Life (on Dec 21) - #7 by Ferni.

I have run into similar problems, and although I have successfully integrated snappy with Python 3.9, I had trouble repeating it when the environment got more complicated. I suggest you use Anaconda to install python 3.6 in the environment and run it from there. This will simplify a lot of things for you.

If you really need Python 3.9, consider using the python library “subprocess” to run a separate python script in 3.6, just for the snappy processing.

After uninstalling everything and installing Python3.6 this is the message I’m getting:

snappy-conf C:\Users\HP\Anaconda3\python.exe C:\Users\HP.snap\snap-python

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.
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=384m; support was removed in 8.0
Python configuration error: Python configuration failed.
Command [C:\Users\HP\Anaconda3\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 1.
Please check the log file ‘C:\Users\HP.snap\snap-python\snappy\snappyutil.log’.

Now 8 days are gone doing exclusively this exercise. I’ll really appreciate if some friend configure snappy for me through screen sharing mode. And I need to use the configuration in Google Colab.

See what the log file says at the file path. It will be helpful.

Could you also show us your windows environment variables? I suspect jpy isn’t finding something, but I’m not sure.

Thanks for responding cndnflyr,

Snappy util.log file says:
INFO: Installing from Java module ‘C:\Program Files\snap\snap\modules\org-esa-snap-snap-python.jar’
INFO: Installing jpy…
INFO: Extracting ‘lib/jpy-0.9.0-cp36-cp36m-win_amd64.whl’ from ‘C:\Program Files\snap\snap\modules\org-esa-snap-snap-python.jar’
INFO: Unzipping ‘C:\Users\HP.snap\snap-python\snappy\lib\jpy-0.9.0-cp36-cp36m-win_amd64.whl’
INFO: Configuring jpy…
INFO: jpy Python API configuration written to ‘C:\Users\HP.snap\snap-python\snappy\jpyconfig.py’
INFO: jpy Java API configuration written to ‘C:\Users\HP.snap\snap-python\snappy\jpyconfig.properties’
INFO: Configuring snappy…
INFO: snappy configuration written to ‘C:\Users\HP.snap\snap-python\snappy\snappy.ini’
INFO: Importing snappy for final test…
Perhaps the dependency file for jvm.dll. But I don’t know about it.

Windows environment variables:

You appear to be using Anaconda Python. Anaconda adds environment variables to it is necessary to use an Anaconda terminal to run Anaconda python.

You can redo the “final test” using python on the command-line (see Configure Python to use the SNAP-Python snappy interface).

This shows none of the variables set by an Anaconda environment.

Tried once again after unistalling anaconda and reinstalling python 3.6.8. And got the message below:
[C:\Python\Python36\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.

How did you install python 3.6.8? Pleas show us snappyutil.log – it should tells the reason for
“return code 30”.

I installed python3.6.8 through python installer in Drive C.
snappyutil.log file says as below:
INFO: Installing from Java module ‘C:\Program Files\snap\snap\modules\org-esa-snap-snap-python.jar’
INFO: Installing jpy…
INFO: Extracting ‘lib/jpy-0.9.0-cp36-cp36m-win_amd64.whl’ from ‘C:\Program Files\snap\snap\modules\org-esa-snap-snap-python.jar’
INFO: Unzipping ‘C:\Python\Python36\Lib\site-packages\snappy\lib\jpy-0.9.0-cp36-cp36m-win_amd64.whl’
INFO: Configuring jpy…
INFO: jpy Python API configuration written to ‘C:\Python\Python36\Lib\site-packages\snappy\jpyconfig.py’
INFO: jpy Java API configuration written to ‘C:\Python\Python36\Lib\site-packages\snappy\jpyconfig.properties’
INFO: Configuring snappy…
INFO: snappy configuration written to ‘C:\Python\Python36\Lib\site-packages\snappy\snappy.ini’
INFO: Importing snappy for final test…
ERROR: Configuration failed with exit code 30

Error 30 can occur when you have a jpy version that targets recent Java versions, see Problems with snappy and Python 3.8.

The “final test” that failed attempts to load [ESA]snappy. In a terminal, run your python3.6 and try import snap. This should give details of the error.