Integrate Python and his libraries with Java

故事扮演 提交于 2020-01-03 06:34:49

问题


I integrate Python and Java with Jython but I need some libraries(pandas, numpy, skfuzzy, matplotlib, sklearn, pickle) but Jython can't support some of them.

Is it possible import that libraries from Jython or exist other Framework, language, library, something that afford a complete integrate with Python libraries.


回答1:


Unfortunately the code for packages like numpy and scipy includes extension modules written in languages like Fortran and C, which are specifically tailored to the CPython interpreter. That makes them incompatible with Jython, which does not support the CPython extension interface.

Probably the best you could do would be to have your Java programs use some sort of network-based communications with a locally-hosted Python server that you could write in CPython, but that might introduce unacceptable inefficiencies, depending on the necessary program structure.



来源:https://stackoverflow.com/questions/32143032/integrate-python-and-his-libraries-with-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!