-
-
Save arivero/71d9531f0189c4df3c4134ddce48fdd0 to your computer and use it in GitHub Desktop.
Function to append to the end of .bashrc file in linux to run PySpark on jupyter notebook for the blog post https://medium.com/@GalarnykMichael/install-spark-on-ubuntu-pyspark-231c45677de0#.qxguj5czj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function snotebook () | |
{ | |
#Spark path (based on your computer) | |
SPARK_PATH=~/spark-2.0.0-bin-hadoop2.7 | |
export PYSPARK_DRIVER_PYTHON="jupyter" | |
export PYSPARK_DRIVER_PYTHON_OPTS="notebook" | |
# For python 3 users, you have to add the line below or you will get an error | |
#export PYSPARK_PYTHON=python3 | |
$SPARK_PATH/bin/pyspark --master local[2] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment