DHI-GRAS / senEtSnapSta

:gear: SNAP STA for Sen-ET
GNU General Public License v3.0
11 stars 2 forks source link

ModuleNotFoundError: No module named 'jpyutil' #10

Closed rasc1974 closed 4 years ago

rasc1974 commented 4 years ago

Hi,

once again I have a problem, to get it running properly: it´s the Import-error, that You described in chapter 3.4.4.

" import jpyutil ModuleNotFoundError: No module named 'jpyutil'"

I tried different versions of python (3.6.0, 3.6.8) and configured SNAP to use with Python but it´s always the same.

Best regards Rainer

radosuav commented 4 years ago

Hi Rainer, Does directory user_name.snap\snap-python\snappy exist on your computer and do you have a file called jpyutil.py in this directory? If not, then something went wrong with your snappy installation and I would recommend to look for solutions on the SNAP forum.

rasc1974 commented 4 years ago

First: yes, second: no, jpyutil.py is missing. I´ll let You know, if I could fix it. Best regards Rainer

rasc1974 commented 4 years ago

I use Win10 and installed SNAP 7.0. When it comes to the step "Configure SNAP for use with Python" within the process of installation there is a hint, that "Only Python versions 2.7, 3.3 and 3.4 are supported."

In the SEN-ET user manual in chapter 3.4.4 is denoted that "Python version has to be 3.6 ..." and when I try to run one of the SEN-ET operators SNAP consequently aborts and gives the message "import jpy Import Error: Module use of python 34.dll conflicts with this version of Python."

But on the other hand, now - with python 3.4, jpyutil.py is located in the folder .snap\snap-python\snappy!

So, I´d be happy, if You´d give a recommendation, how to continue.

Best regards Rainer

radosuav commented 4 years ago

Hi Rainer, According to SNAP wiki Python 3.6 is supported. From our experience it works out of the box, without any extra configuration. Maybe you could try uninstalling SNAP, deleting all the extra directories (at least user_name\AppData\Roaming\SNAP and user_name/.snap) and doing a new clean installation. It looks like a SNAP issue so maybe somebody on SNAP forum can provide a better solution.

rasc1974 commented 4 years ago

Hi Radoslaw, thank You. Now I managed to make SNAP 7 working with Python 3.6.3 on my system. It seems, that the SEN-ET plugin also works properly. The file jpyutil.py exists within the folder .snap\snap-python\snappy. So far so good. There is another problem with SNAP but that doesn´t belong here. Best regards Rainer

gerrardenglish commented 4 years ago

I am having similar issues to the discussion above but cant seem to fix the issue using the provided advise. I have tried a number of different versions of Python, most recently 3.6.3 as used above. When trying to configure SNAP to python in the SNAP Command-Line I receive the error

Python configuration error: Python configuration failed. Command [C:\Users\2015013\python-3.6.3\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 11G --java_home "C:\Program Files\snap\jre" --req_arch amd64] failed with return code 1. Please check the log file 'C:\Users\2015013.snap\snap-python\snappy\snappyutil.log'.

and in the snappy.util.log

INFO: Configuring jpy... ERROR: Traceback (most recent call last): File ".\snappyutil.py", line 280, in _main force=args.force) File ".\snappyutil.py", line 170, in _configure_snappy import jpyutil ModuleNotFoundError: No module named 'jpyutil'

ERROR: Configuration failed with exit code 40

however, the module jpyutil.py exists in the C:\Users\2015013.snap\snap-python\snappy folder

any help regarding this issue and how to configure Python would be greatly appreciated.

Many thanks, Gerrard

radosuav commented 4 years ago

Hi @gerrardenglish this is a local issue on your machine and a SNAP issue so we cannot help you much. I pointed you to this discussion from the SNAP forum so that you could read it and maybe get some ideas. If this didn't help then I recommend to continue the discussion on the SNAP forum with the hope that someone from the community can assist.