Closed altendky closed 3 years ago
Seems like it failed to build or install org.jpype.jar in the proper location. That is the usual reason for that error. (Side issue, we should improve the error reporting for that). I have installed it successfully both by installing from repo with pip+git and using setup.py directly in that past.
I am not exactly familiar with pyinstaller. I would have to go through the procedure in detail which I won't have time to do until this weekend. I would try to see if you have better luck with 1.1.2, though I suspect you will get the same behavior.
My best guess is that the pip installer is installing the python extensions, the java extension, the python files, and the manifest. But pyinstaller likely does not know about the java extension so it may not be packaging it properly. I am not sure how you add additional files to the pyinstaller. We manually added a Java extension in setup.py so that pip would be aware of it. It gets built under build/lib.${arch}
and does not have a specific manifest entry as the location where it is found moves based on the build.
I'll dig into org.jpype.jar
and confirming it is not being included and getting it included. That's exactly the sort of quick guidance I was hoping for, thanks. I'll follow up with what I find.
Just switching to the following worked. It's certainly a hardcode as is with the path and the :
which would be ;
on Windows, though. I may make some time to look into making a PyInstaller hook or such for this. If so, I'll follow up here. Thanks again for the quick response to get me going.
venv/bin/pyinstaller --add-binary venv/lib/python3.8/site-packages/org.jpype.jar:. j.py
fixed by #877
Is there existing PyInstaller support or might it be added? I am of course hoping this is a trivial thing to debug for someone with actual Java and JPype knowledge.
:]
I have been using javabridge for a few years but might be switching to JPype. I don't do much to care about 'advanced' features but having the wheels would be nice. I am presently working in Linux but would use this on both Linux and Windows. I am getting the followingSystemError
.As some probably irrelevant reference, this is for a private project I have that uses https://github.com/altendky/ccstudiodss for access to TI's Code Composer Studio DSS debugging tooling.
Here are some commands to recreate a trivial example failure from within a clone of the JPype repository. I don't like to leave recursive delete commands laying around but maybe remove
build/
,dist/
, andvenv/
before each run.Expand for full console session
```bash $ git rev-parse HEAD b6d3996fe8d0ac58695aa9867ecf141dfc3196ec ``` ```bash $ git status On branch master Your branch is up to date with 'origin/master'. Untracked files: (use "git addThe diff of the printed environment is that when the PyInstaller result is run there are these four extra variables set.
Thanks for your time and consideration. If there's any more information or things I can try to help out, let me know.