Hello <#C03G7LJTS2G|troubleshooting> I want to sub...
# troubleshooting
s
Hello #troubleshooting I want to submit the developed
pyflink
jobs but the problem I am confronting as of now is, I am able to submit the JAR file (like one from the examples in Flink distribution) but unable to submit the
.py
files. I tried this command but it fails
$ ./bin/flink run --python examples/python/table/word_count.py
with error
Caused by: java.io.IOException: Cannot run program "python": error=2, No such file or directory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at org.apache.flink.client.python.PythonEnvUtils.startPythonProcess(PythonEnvUtils.java:368)
at org.apache.flink.client.python.PythonEnvUtils.launchPy4jPythonClient(PythonEnvUtils.java:482)
at org.apache.flink.client.python.PythonDriver.main(PythonDriver.java:92)
... 14 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.init(ProcessImpl.java:340)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
I am using Docker image and my job manager and task manager are running fine. So is there any catch here? I followed the official documentation and due to some reasons I have two Python versions in my system:
3.8
and
3.10
t
Did you consider this additional step to set up Python in the Docker image?
s
@Tilman Krokotsch Thanks for your reply. But basically thats the custom docker image as I can see from that link. But nothing similar is mentioned on the link shared by me. So, not sure what could be the best way to submit Pyflink jobs.
t
The link you shared linked to the basic instructions for Docker but further down it is mentioned that you need to install Python in the Docker image to run Python jobs. I just wanted to make sure you have done this. The error looks like the Python interpreter cannot be found in the image. Could you try to double check it is installed inside the image and is in the PATH?
s
@Tilman Krokotsch Sure I will definitely check this and will let you know about it in a day or two.