There's another sourceforge project called pyro4. It can handle python modules like: numpy, sklearn... And maybe it's even better because it is currently developed. (last jepp version was released in 2010)
Answer from Balazs Varhegyi on Stack Overflow
» pip install jep
java - How to use python modules in jepp? - Stack Overflow
Java and Python Integration using Jep - Stack Overflow
Best way to combine Python and Java?
python - Using Jep to modify java object - Stack Overflow
There's another sourceforge project called pyro4. It can handle python modules like: numpy, sklearn... And maybe it's even better because it is currently developed. (last jepp version was released in 2010)
Check out https://github.com/mrj0/jep, that's where JEP is now. And it seems it was updated recently. As per the site it now works with Python version >= 2.6.
My project uses some packages that are available only in Python and heavily rely on C libraries. The project also greatly benefits from Java libraries and the JVM. What's the optimal way to call Python functions from Java?
I tried:
-
Small web-services: overhead to serialize data, start and stop the services. Also debugging is harder and implementing each new function is now double the effort.
-
Jpy: a library that runs an interpreter in the JVM. Spare the service start/stop, but: isn't really feasible for more than a single-liner, data translation between Java and Python is cumbersome, and I also encountered runtime segmentation fault errors.
Any other options?
The project is in the machine-learning domain, so involves exchanging large numeric arrays and text. In some cases the execution switches back and forth between the platforms.