diff options
Diffstat (limited to 'bin/pyspark')
-rwxr-xr-x | bin/pyspark | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/pyspark b/bin/pyspark index 392a92b670..d6810f4686 100755 --- a/bin/pyspark +++ b/bin/pyspark @@ -23,7 +23,7 @@ FWDIR="$(cd `dirname $0`/..; pwd)" # Export this as SPARK_HOME export SPARK_HOME="$FWDIR" -SCALA_VERSION=2.9.3 +SCALA_VERSION=2.10 # Exit if the user hasn't compiled Spark if [ ! -f "$FWDIR/RELEASE" ]; then @@ -59,8 +59,12 @@ if [ -n "$IPYTHON_OPTS" ]; then fi if [[ "$IPYTHON" = "1" ]] ; then - IPYTHON_OPTS=${IPYTHON_OPTS:--i} - exec ipython "$IPYTHON_OPTS" -c "%run $PYTHONSTARTUP" + # IPython <1.0.0 doesn't honor PYTHONSTARTUP, while 1.0.0+ does. + # Hence we clear PYTHONSTARTUP and use the -c "%run $IPYTHONSTARTUP" command which works on all versions + # We also force interactive mode with "-i" + IPYTHONSTARTUP=$PYTHONSTARTUP + PYTHONSTARTUP= + exec ipython "$IPYTHON_OPTS" -i -c "%run $IPYTHONSTARTUP" else exec "$PYSPARK_PYTHON" "$@" fi |