I am trying to install the snappy Python binding on a MacBook Pro and the installer is looking for jpy.macosx-10.6-x86_64-2.7.zip, which is not contained in the distribution jar file. Can I use an alternate jpy file (compiled locally from source) with the snappy installer?
Hi Gary, sorry for this! Unfortunately the standard libraries for Mac OS come in a number of partly incompatible flavours and we only have to two of them here for testing. If your time allows for, you could try building the file itself. (This would also be a great contribution to SNAP!). This is what you would have to do:
Make sure an up-to-date JDK 8 is installed, preferably the Oracle distribution, because this is the one we use in SNAP
Make the JDK_HOME env var points to the JDK installation directory. If this variable is already in use, you can also set JPY_JDK_HOME
Thanks Gary! Now unpack the zip into your ~/.snap/snap-python/snappy directory (which should have been already created) so that you have jpy.so, jdl.so, and jpyutil.py in there. Then cd into snappy and type
> python ./jpyutil.py -j -p
assuming JDK_HOME is still set to the JDK youâve used to build jpy. You can also use
In order to make all this easier, Iâve also just created https://senbox.atlassian.net/browse/SNAP-199:Allow custom SNAP-Python configurations by manual jpy builds. Note that all this only happens, if we donât have precompiled binaries for the target platform.
thanks for developing this stuff that I learned during the Hackathon. I was trying to using snappy from an isolated virtualenv environment but when I attempted to install jpy by running PIP then it failed. I filed a ticket on github https://github.com/bcdev/jpy/issues/65
Please let me know if I can be useful to solve this.
I have installed apache maven 3.3.9, and jdk "/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/ ". However the build fails with this error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project jpy: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? â [Help 1]
This means that it does not successfully create the jpy zip file you mentioned in the jpy/build directory.
I do get these files:
dist/jpy-0.9_SNAPSHOT-cp27-none-macosx_10_5_x86_64.whl
build/lib.macosx-10.5-x86_64-2.7
A little concerned with the 10.5 not 10.6 as in your example.
Thanks for reporting this, and sorry - such build errors are always annoying. However, Iâll need the test logs to see where the error actually originated. Can you pls attach them or just copy+paste the outputs of the failing tests. Also the JVM dump file (hs_err_pid.log or so) would be helpful.
@Phil, update: just tried to build jpy for Python 3.5 on Windows 10 for the first time. It seems that some features of the Python 3.5 setuptools module changed in an incompatible way, at least for the Windows platform. The first thing I recognized was that the goal bdist_wheeldidnât work anymore so I had to pip install wheel. But then I failed having the same error as you, see below. This is a pitty, because we seem to need a customized build step for Python 3.5, therefore fixing this will take some time, sorry for this.
how long do you think fixing will take?
is there a way to avoid this problem? (Maybe doing the same on a windows 7 PC or with an older python version?)
I want to use snappy on python for my bachelor thesis, so I don´t know if its better to use the SNAP toolbox instead.
I have 51 satellite images, do you know another way to âautomateâ the preprocessing process?
Sorry, if it would have been Sentinel-2 or other Optical data then I could have helped you. But with radar I have no experience with alternative approaches.
Cheers,
Andreas
PS: Did you try it with the command window prompt? Write âgptâ in your command window to see all tools. Or if you know the name of the tool you are going to use e.g. âgpt -h Multi-Temporal-Speckle-Filterâ or âgpt -h TOPSAR-Splitâ. These command window prompts you can also automatize in Python.
In python you also can call the command prompt. e.g.:
import os
cmd = âgpt -h TOPSAR-Splitâ
os.system(cmd)
There are also other functions which allows you to search for files or folders in a certain directory and give you back a list of strings. With these you can iterate through your 51 files and adjust the âcmdâ string/prompt or do whatever you need (e.g. adjust the XML-File).