我使用ProcessBuilder从Java调用Python(Anaconda)代码。当我只安装Python时,它运行得很好。但现在我移除了Python,安装了Python。调用Python的代码现在不工作。 获取以下错误。在
com.api.ai.helper.MLPythonAPI callPyhonScriptToPredict
SEVERE: null
java.io.IOException: Cannot run program "python": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at com.api.ai.helper.MLPythonAPI.callPyhonScriptToPredict(MLPythonAPI.java:66)
我使用python3.6.1(anaconda3 4.4.0 64位)和以下代码来执行python
^{pr2}$有人能帮我吗。在
我在命令方法中传递了完整的Python路径(而不是“Python”),现在它工作得很好。在
相关问题 更多 >
编程相关推荐