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 enter the new Livy Server Default Group.
- In check the Livy Server for Spark 3 Default Group checkbox.
- In enter the Livy Server for Spark 3 Default Group value.
- In enter the following values:
- 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
- In enter the following values:
- 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
