Python 3.6 Installation Error with Windows 10

Hi,

I am trying to make snappy running in my python 3.6 environment. I installed jpy 8.0 by myself and trying to run your sample code

import sys
sys.path.append(r'C:\Users\abc\.snap\snap-python\snappy')
from snappy import ProductIO
import numpy as np
import matplotlib.pyplot as plt
 
p = ProductIO.readProduct(r'C:\Users\abc\.snap\snap-python\snappy\testdata\MER_FRS_L1B_SUBSET.dim')
rad13 = p.getBand('radiance_13')
w = rad13.getRasterWidth()
h = rad13.getRasterHeight()
rad13_data = np.zeros(w * h, np.float32)
rad13.readPixels(0, 0, w, h, rad13_data)
p.dispose()
rad13_data.shape = h, w
imgplot = plt.imshow(rad13_data)
imgplot.write_png('radiance_13.png')

An exeception thrown out when doing “readProduct” step. RuntimeError: java.lang.IllegalArgumentException: org.geotools.styling.StyleFactory is not an ImageIO SPI class

Anyone has any idea how to solve this? The code is totally fine if I change to Python 3.4.

We have tested jpy only up to Python version 3.4. So it might not work with higher versions.
However, I don’t know why the different version causes such an error.

I ques it is not related to the python version.
On linux the error could be reproduced as follows: Build jpy (python3 setup.py --maven build) add the path to .../jpy/build/lib.linux-x86_64-3.x to PYTHONPATH). Then build jpy wheel (python3 setup.py --maven bdist_wheel) and copy it to ~/.snap/snap-python/snappy).
And the error will disappear if you delete the path to .../jpy/build/lib.linux-x86_64-3.x from PYTHONPATH.

You are right, this has nothing to do with the distribution or even the OS. I have the same problem when executing the example code and I am working with OS X and python 2.7 (and SNAP 6).

Does any have the answer how to solve this?