Setting Python path variables for Livy
Livy uses the Python executable and PYTHONPATH as set by the Cloudera Manager Agent for PySpark sessions. If required, it is possible to override these default settings via multiple environment variables.
You can override the default settings for PYTHONPATH
using the
following methods:
- In check the checkbox.
- In Livy Server Default Group. enter the new
- In Livy Server for Spark 3 Default Group checkbox. check the
- In Livy Server for Spark 3 Default Group value. enter the
- In
- spark.yarn.appMasterEnv.PYSPARK_DRIVER_PYTHON=/path/to/python_binary
- spark.yarn.appMasterEnv.PYSPARK_PYTHON=/path/to/python_binary
- spark.yarn.executorEnv.PYSPARK_PYTHON=/path/to/python_binary
enter the following values:
- In
- spark.yarn.appMasterEnv.PYSPARK_DRIVER_PYTHON=/path/to/python_binary
- spark.yarn.appMasterEnv.PYSPARK_PYTHON=/path/to/python_binary
- spark.yarn.executorEnv.PYSPARK_PYTHON=/path/to/python_binary
enter the following values: