Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/find-spark-home
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ else
if [[ -z "$PYSPARK_DRIVER_PYTHON" ]]; then
PYSPARK_DRIVER_PYTHON="${PYSPARK_PYTHON:-"python3"}"
fi
export SPARK_HOME=$($PYSPARK_DRIVER_PYTHON "$FIND_SPARK_HOME_PYTHON_SCRIPT")
export SPARK_HOME=$($PYSPARK_DRIVER_PYTHON "$FIND_SPARK_HOME_PYTHON_SCRIPT" | cut -d $'\007' -f 2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does it relate to #28256? Does it support jupyter too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears to be the same problem but with a different solution.

I hadn't tried it with jupyter before so I don't know what I should expect.

Running it with PYSPARK_DRIVER_PYTHON=jupyter made it attempt to run jupyter-/path/to/find_spark_home.py, which failed with it failing to find /bin/load-spark-env.sh or /bin/spark-submit.

Running it with PYSPARK_DRIVER_PYTHON='jupyter notebook' started the kernel but initially opened a 403 forbidden page in the browser, complaining of lacking a referrer. I pasted the URL with the token appearing in the jupyter log and it took me to the bin directory under the virtual environment.

It doesn't appear to me that $PYSPARK_DRIVER_PYTHON "$FIND_SPARK_HOME_PYTHON_SCRIPT" should run with PYSPARK_DRIVER_PYTHON set to "jupyter".

fi