diff --git a/bin/find-spark-home b/bin/find-spark-home index 617dbaa4fff86..462b538b00a04 100755 --- a/bin/find-spark-home +++ b/bin/find-spark-home @@ -33,9 +33,9 @@ elif [ ! -f "$FIND_SPARK_HOME_PYTHON_SCRIPT" ]; then export SPARK_HOME="$(cd "$(dirname "$0")"/..; pwd)" else # We are pip installed, use the Python script to resolve a reasonable SPARK_HOME - # Default to standard python interpreter unless told otherwise + # Default to standard python3 interpreter unless told otherwise if [[ -z "$PYSPARK_DRIVER_PYTHON" ]]; then - PYSPARK_DRIVER_PYTHON="${PYSPARK_PYTHON:-"python"}" + PYSPARK_DRIVER_PYTHON="${PYSPARK_PYTHON:-"python3"}" fi export SPARK_HOME=$($PYSPARK_DRIVER_PYTHON "$FIND_SPARK_HOME_PYTHON_SCRIPT") fi diff --git a/bin/find-spark-home.cmd b/bin/find-spark-home.cmd index 6025f67c38de4..f795d146d49c7 100644 --- a/bin/find-spark-home.cmd +++ b/bin/find-spark-home.cmd @@ -20,8 +20,8 @@ rem rem Path to Python script finding SPARK_HOME set FIND_SPARK_HOME_PYTHON_SCRIPT=%~dp0find_spark_home.py -rem Default to standard python interpreter unless told otherwise -set PYTHON_RUNNER=python +rem Default to standard python3 interpreter unless told otherwise +set PYTHON_RUNNER=python3 rem If PYSPARK_DRIVER_PYTHON is set, it overwrites the python version if not "x%PYSPARK_DRIVER_PYTHON%"=="x" ( set PYTHON_RUNNER=%PYSPARK_DRIVER_PYTHON% diff --git a/bin/pyspark b/bin/pyspark index ad4132fb59eb0..463a2dcfc7e6c 100755 --- a/bin/pyspark +++ b/bin/pyspark @@ -37,9 +37,9 @@ if [[ -n "$IPYTHON" || -n "$IPYTHON_OPTS" ]]; then exit 1 fi -# Default to standard python interpreter unless told otherwise +# Default to standard python3 interpreter unless told otherwise if [[ -z "$PYSPARK_PYTHON" ]]; then - PYSPARK_PYTHON=python + PYSPARK_PYTHON=python3 fi if [[ -z "$PYSPARK_DRIVER_PYTHON" ]]; then PYSPARK_DRIVER_PYTHON=$PYSPARK_PYTHON