[ https://issues.apache.org/jira/browse/FLINK-17114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082290#comment-17082290 ]
Wei Zhong commented on FLINK-17114: ----------------------------------- [~zjffdu] Yes, this problem occurs when the python interpreter which launches the PyFlink job is not the default "python" command of current environment. e.g. the default "python" command points to Python 2.7 and the python interpreter which launches the PyFlink job is Python 3.7. For minicluster execution, it makes more sense that the job and the UDF workers should be launched by the same python interpreter. Of course users could set the python interpreter of the UDF worker manually via `set_python_executable(sys.executable)`. But it requires users to understand some implementation details of Python UDF. Many users who install multiple python versions on their machine encountered this problem when they run their first PyFlink jobs. So I think we should fix this to improve the user experience and make the learning curve smoother. > When the pyflink job runs in local mode and the command "python" points to > Python 2.7, the startup of the Python UDF worker will fail. > -------------------------------------------------------------------------------------------------------------------------------------- > > Key: FLINK-17114 > URL: https://issues.apache.org/jira/browse/FLINK-17114 > Project: Flink > Issue Type: Bug > Components: API / Python > Affects Versions: 1.10.0, 1.11.0 > Reporter: Wei Zhong > Assignee: Wei Zhong > Priority: Major > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > When the PyFlink job runs in local mode and the command "python" points to > Python 2.7, the startup of the Python UDF worker will fail because "python" > is the default interpreter of the Python UDF worker. For this case we need to > set the default value of "python.executable" to `sys.executable` i.e. the > python interpreter which launches the job. -- This message was sent by Atlassian Jira (v8.3.4#803005)