Github user zjffdu commented on a diff in the pull request: https://github.com/apache/spark/pull/13146#discussion_r73976507 --- Diff: launcher/src/main/java/org/apache/spark/launcher/SparkSubmitCommandBuilder.java --- @@ -294,11 +294,23 @@ appResource = PYSPARK_SHELL_RESOURCE; constructEnvVarArgs(env, "PYSPARK_SUBMIT_ARGS"); - // The executable is the PYSPARK_DRIVER_PYTHON env variable set by the pyspark script, - // followed by PYSPARK_DRIVER_PYTHON_OPTS. + // Will pick up the binary executable in the following order + // 1. conf spark.pyspark.driver.python + // 2. conf spark.pyspark.python + // 3. environment variable PYSPARK_DRIVER_PYTHON + // 4. environment variable PYSPARK_PYTHON + // 5. python List<String> pyargs = new ArrayList<>(); - pyargs.add(firstNonEmpty(System.getenv("PYSPARK_DRIVER_PYTHON"), "python")); + pyargs.add(firstNonEmpty(conf.get(SparkLauncher.PYSPARK_DRIVER_PYTHON), + conf.get(SparkLauncher.PYSPARK_PYTHON), + System.getenv("PYSPARK_DRIVER_PYTHON"), + System.getenv("PYSPARK_PYTHON"), + "python")); String pyOpts = System.getenv("PYSPARK_DRIVER_PYTHON_OPTS"); + if (conf.containsKey(SparkLauncher.PYSPARK_PYTHON)) { --- End diff -- Yesï¼python process needs this environment variable.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org