mzhang-code commented on a change in pull request #28256:
URL: https://github.com/apache/spark/pull/28256#discussion_r411586125



##########
File path: bin/find-spark-home
##########
@@ -34,8 +34,5 @@ elif [ ! -f "$FIND_SPARK_HOME_PYTHON_SCRIPT" ]; then
 else
   # We are pip installed, use the Python script to resolve a reasonable 
SPARK_HOME
   # Default to standard python interpreter unless told otherwise
-  if [[ -z "$PYSPARK_DRIVER_PYTHON" ]]; then
-     PYSPARK_DRIVER_PYTHON="${PYSPARK_PYTHON:-"python"}"
-  fi
-  export SPARK_HOME=$($PYSPARK_DRIVER_PYTHON "$FIND_SPARK_HOME_PYTHON_SCRIPT")
+  export SPARK_HOME=$(${PYSPARK_PYTHON:-"python"} 
"$FIND_SPARK_HOME_PYTHON_SCRIPT")

Review comment:
       That's a workaround for `ipython`, but not for `jupyter`, because 
`jupyter` doesn't support `jupyter find_spark_home.py`. I think 
`PYSPARK_DRIVER_PYTHON` is more meant for "frontend". This fix enables `
   PYSPARK_DRIVER_PYTHON=jupyter PYSPARK_DRIVER_PYTHON_OPTS=notebook  pyspark` 
too.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to