本文档是 Apache Flink 的旧版本。建议访问 最新的稳定版本

环境变量

These environment variables will affect the behavior of PyFlink:

Environment Variable Description
FLINK_HOME PyFlink job will be compiled before submitting and it requires Flink's distribution to compile the job. PyFlink's installation package already contains Flink's distribution and it's used by default. This environment allows you to specify a custom Flink's distribution.
PYFLINK_CLIENT_EXECUTABLE The path of the Python interpreter used to launch the Python process when submitting the Python jobs via "flink run" or compiling the Java/Scala jobs containing Python UDFs. Equivalent to the configuration option 'python.client.executable'. The priority is as following:
  1. The configuration 'python.client.executable' defined in the source code;
  2. The environment variable PYFLINK_CLIENT_EXECUTABLE;
  3. The configuration 'python.client.executable' defined in flink-conf.yaml
If none of above is set, the default Python interpreter 'python' will be used.