AttributeError: module 'jpy' has no attribute 'has_jvm'

I am trying to use snappy in Python 3.6 within Anaconda 3 (Spyder). Upon installation of snap, I selected the correct python version. When I ran ‘import snappy’, I first got the error ‘ModuleNotFoundError: No module named ‘jpyutil’’. I then changed ‘import jpyutil’ to ‘from jpy import jpyutil’ in the init.py file (which may have been a bad idea). Now, I get the following error message:

AttributeError: module ‘jpy’ has no attribute ‘has_jvm’

Maybe you did not add this before the snappy import.

sys.path.append('<snappy-dir>') # or sys.path.insert(1, '<snappy-dir>')

See the ‘Configure python’ section on this page: Configure Python to use the SNAP-Python snappy interface

@bfelten were you able to solve this error? I am facing the same using python 3.7 on ubuntu 18.

In case you have Windows os, it’s not possible to configure snappy with any of pythons’ versions, except of py27 and py34, for more details please take a look at the following thread,

Source of the thread

Concerning Linux I think it’s possible, take a look at the following thread,

Source of the thread

I have managed to configure snappy on Windows with python 3.6 as I said in this thread:

Numpy, snappy and python 3.4

Actually, for me I did all the trials are mentioned, but I didn’t get any conf. Results, I also found during the SNAP installation, it’s recognizing py27 and py34 automatically , without to navigate to the py folder.