I have been trying to install SNAPPY and keep running into problems with my versions of Python and jpy
I can build the jpy wheels from here, no problem. I am using the “release/v0.13.0” branch because the release notes tell me this version works with Python 3.11
I have Python 3.11 installed in a fresh conda environment (SNAPPY_v311). I run
./snappy-conf /home/egreatrix/miniconda3/envs/SNAPPY_v311/bin/python3.11
and I expectantly get an error stating that I don’t have the jpy wheels installed (failed with return code 10
).
I get my wheel from home/egreatrix/jpy/dist/*.whl
and copy it into /home/egreatrix/.snap/snap-python/snappy
.
I run ./snappy-conf /home/egreatrix/miniconda3/envs/SNAPPY_v311/bin/python3.11
This time I get
INFO: Installing from Java module ‘/usr/local/snap/snap/modules/org-esa-snap-snap-python.jar’
WARNING: Architecture requirement possibly not met: Python is x86_64 but JVM requires amd64
INFO: Installing jpy…
INFO: Unzipping ‘/home/egreatrix/.snap/snap-python/snappy/jpy-0.13.0-cp311-cp311-linux_x86_64.whl’
INFO: Configuring jpy…
INFO: jpy Python API configuration written to ‘/home/egreatrix/.snap/snap-python/snappy/jpyconfig.py’
INFO: jpy Java API configuration written to ‘/home/egreatrix/.snap/snap-python/snappy/jpyconfig.properties’
INFO: Configuring snappy…
INFO: snappy configuration written to ‘/home/egreatrix/.snap/snap-python/snappy/snappy.ini’
INFO: Importing snappy for final test…
ERROR: Configuration failed
RuntimeError: jpy: internal error: static method not found: unwrapProxy(Ljava/lang/Object;)Lorg/jpy/PyObject;
~
~
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/home/egreatrix/.snap/snap-python/snappy/./snappyutil.py”, line 259, in _main
ret_code = _configure_snappy(snap_home=args.snap_home,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/egreatrix/.snap/snap-python/snappy/./snappyutil.py”, line 213, in _configure_snappy
import(‘snappy’)
File “/home/egreatrix/.snap/snap-python/snappy/…/snappy/init.py”, line 235, in
jpy.create_jvm(options=_get_snap_jvm_options())
SystemError: returned a result with an exception set
I have previously fixed this by using python 3.8 and a jpy wheel from here, thanks to @Ferni . However, I was just wondering if anyone had got SNAPPY working in Python 3.11, using jpy wheels from the JPY Consortium repository?
Any other information that may be of use, I have:
- SNAP Release Version 6
- jdk-22 (added to path)
- apache-maven-3.9.6 (added to path)
- The python install in my conda env SNAPPY_v311 is the first python install in my path