java.io.exception无法运行程序;python“;
我试图通过ubuntu中的命令行在ApacheStorm上运行wordcount拓扑,它使用multiland属性使用python编写的程序将单词从句子中分割出来。 我已经在.bashrc文件中设置了multilang dir的类路径,但在执行时仍然出现错误java.io.exception无法运行程序;python“;,java,python,apache-storm,Java,Python,Apache Storm,我试图通过ubuntu中的命令行在ApacheStorm上运行wordcount拓扑,它使用multiland属性使用python编写的程序将单词从句子中分割出来。 我已经在.bashrc文件中设置了multilang dir的类路径,但在执行时仍然出现错误 java.lang.RuntimeException: Error when launching multilang subprocess Caused by: java.io.IOException: Cannot run program
java.lang.RuntimeException: Error when launching multilang subprocess
Caused by: java.io.IOException: Cannot run program "python" (in directory "/tmp/eaf0b6b3-67c1-4f89-b3d8-23edada49b04/supervisor/stormdist/word-count-1-1414559082/resources"): error=2, No such file or directory
系统中安装的python可能有其默认路径,例如/usr/bin或/usr/local/bin。Python模块可能有不同的路径 不要完全覆盖.bashrc中的$PATH环境变量
或者,您可以设置要运行的Python脚本的执行位,并在storm中作为普通程序调用该脚本。我找到了答案,我向storm提交了jar,但它包含的集群是本地的,因此将jar上载到storm时类路径不起作用,我重新修改了代码,将本地集群更改为storm集群,然后将其成功上载到storm,在此过程中,我还将multilang文件夹的类路径包含在eclipse ide中,而不是在.bashrc文件中创建它。这些设置已经完成,答案需要进一步改进。