Last active
October 3, 2025 16:28
-
Star
(158)
You must be signed in to star a gist -
Fork
(54)
You must be signed in to fork a gist
-
-
Save ololobus/4c221a0891775eaa86b0 to your computer and use it in GitHub Desktop.
Revisions
-
ololobus revised this gist
Jun 19, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -48,7 +48,7 @@ https://spark.apache.org/ From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/apache-spark.rb ``` Also check `py4j` version and subpath, it may differ from version to version. Ipython profile -
ololobus revised this gist
Jun 5, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -48,6 +48,8 @@ https://spark.apache.org/ From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/apache-spark.rb ``` Also check `py4j` version and subpath, it mau differ from version to version. Ipython profile ---------------------- -
ololobus revised this gist
Mar 27, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ Apache Spark installation + ipython/jupyter notebook integration guide for macOS ================================================================================ Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112 -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -95,5 +95,5 @@ $ pyspark which will open a web notebook with `sc` available automatically. <a> -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -95,5 +95,5 @@ $ pyspark which will open a web notebook with `sc` available automatically.  -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -95,5 +95,5 @@ $ pyspark which will open a web notebook with `sc` available automatically.  -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -95,5 +95,5 @@ $ pyspark which will open a web notebook with `sc` available automatically.  -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -95,5 +95,5 @@ $ pyspark which will open a web notebook with `sc` available automatically.  -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -95,5 +95,5 @@ $ pyspark which will open a web notebook with `sc` available automatically.  -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ Apache Spark installation + ipython/jupyter notebook integration guide for Mac OS X =================================================================================== Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112 @@ -94,3 +93,7 @@ and then simply run $ pyspark ``` which will open a web notebook with `sc` available automatically.  -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ Apache Spark installation + ipython/jupyter notebook integration guide for Mac OS X ===================================================================================  Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112 -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ Apache Spark installation + ipython/jupyter notebook integration guide for Mac OS X ===================================================================================  Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112 @@ -93,6 +94,3 @@ and then simply run $ pyspark ``` which will open a web notebook with `sc` available automatically. -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -64,7 +64,7 @@ It seems that it is not possible to run various custom startup files as it was w Run ipython ----------- ``` $ jupyter-notebook ``` Initialize `pyspark` -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Apache Spark installation + ipython/jupyter notebook integration guide for Mac O Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112 For older versions of Spark and ipython, please, see also [previous version of text](https://gist.github.com/ololobus/4c221a0891775eaa86b0/956c90bceef6424ef74cc68c4b8b1acd688e1c82). Install Java Development Kit -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Apache Spark installation + ipython/jupyter notebook integration guide for Mac O Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112 For old versions of Spark and ipython, please, see also [previous version of text](https://gist.github.com/ololobus/4c221a0891775eaa86b0/956c90bceef6424ef74cc68c4b8b1acd688e1c82). Install Java Development Kit -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -92,7 +92,7 @@ and then simply run ```shell $ pyspark ``` which will open a web notebook with `sc` available automatically.  -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -81,7 +81,7 @@ Out[2]: <pyspark.context.SparkContext at 0x10a982b10> ``` Alternatively ------------- You can also force `pyspark` shell command to run ipython web notebook instead of command line interactive interpreter. To do so you have to add following env variables: ```shell -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -83,7 +83,7 @@ Out[2]: <pyspark.context.SparkContext at 0x10a982b10> Alternatively ============= You can also force `pyspark` shell command to run ipython web notebook instead of command line interactive interpreter. To do so you have to add following env variables: ```shell export PYSPARK_DRIVER_PYTHON=jupyter export PYSPARK_DRIVER_PYTHON_OPTS=notebook -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -59,7 +59,7 @@ $ ipython notebook --profile=pyspark [TerminalIPythonApp] WARNING | You likely want to use `jupyter notebook` in the future [W 01:45:07.821 NotebookApp] Unrecognized alias: '--profile=pyspark', it will probably have no effect. ``` It seems that it is not possible to run various custom startup files as it was with `ipython` profiles. Thus, the easiest way will be to run `pyspark` init script at the beginning of your notebook manually or follow [alternative way](#alternatively). Run ipython ----------- -
ololobus revised this gist
Feb 13, 2017 . 1 changed file with 15 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -80,4 +80,19 @@ In [2]: sc Out[2]: <pyspark.context.SparkContext at 0x10a982b10> ``` Alternatively ============= You can also force `pyspark` shell command to run ipython web notebook instead of command line intercative interpreter. To do so you have to add following env variables: ```shell export PYSPARK_DRIVER_PYTHON=jupyter export PYSPARK_DRIVER_PYTHON_OPTS=notebook ``` and then simply run ```shell $ pyspark ``` which will open web notebook with `sc` available automatically.  -
ololobus revised this gist
Feb 12, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Apache Spark installation + ipython/jupyter notebook integration guide for Mac O Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112 For old versions of Spark and ipython, please, see [previous version](https://gist.github.com/ololobus/4c221a0891775eaa86b0/956c90bceef6424ef74cc68c4b8b1acd688e1c82). Install Java Development Kit -
ololobus revised this gist
Feb 12, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,8 @@ Apache Spark installation + ipython/jupyter notebook integration guide for Mac O Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112 For old versions of Spark and ipython, please, see [previous version](https://gist.github.com/ololobus/4c221a0891775eaa86b0/956c90bceef6424ef74cc68c4b8b1acd688e1c82) Install Java Development Kit ---------------------------- -
ololobus revised this gist
Feb 12, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -57,7 +57,7 @@ $ ipython notebook --profile=pyspark [TerminalIPythonApp] WARNING | You likely want to use `jupyter notebook` in the future [W 01:45:07.821 NotebookApp] Unrecognized alias: '--profile=pyspark', it will probably have no effect. ``` It seems that it is not possible to run various custom startup files as it was with `ipython` profiles. Thus, the easiest way will be to run `pyspark` init script at the beginning of your notebook manually. Run ipython ----------- -
ololobus revised this gist
Feb 12, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -47,7 +47,7 @@ From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/apache-spark ``` Ipython profile ---------------------- Since [profiles are not supported](http://jupyter.readthedocs.io/en/latest/migrating.html#since-jupyter-does-not-have-profiles-how-do-i-customize-it) in `jupyter` and now you can see following deprecation warning -
ololobus revised this gist
Feb 12, 2017 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -78,5 +78,4 @@ In [2]: sc Out[2]: <pyspark.context.SparkContext at 0x10a982b10> ```  -
ololobus revised this gist
Feb 12, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -79,4 +79,4 @@ Out[2]: <pyspark.context.SparkContext at 0x10a982b10> ```  -
ololobus revised this gist
Feb 12, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -65,6 +65,7 @@ Run ipython jupyter-notebook ``` Initialize `pyspark` ```ipython In [1]: import os execfile(os.path.join(os.environ["SPARK_HOME"], 'python/pyspark/shell.py')) -
ololobus revised this gist
Feb 12, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -57,7 +57,7 @@ $ ipython notebook --profile=pyspark [TerminalIPythonApp] WARNING | You likely want to use `jupyter notebook` in the future [W 01:45:07.821 NotebookApp] Unrecognized alias: '--profile=pyspark', it will probably have no effect. ``` It seems that it's possible to run various custom startup files as it was with `ipython` profiles. Thus, the easiest way will be to run `pyspark` init script at the beginning of your notebook manually. Run ipython ----------- -
ololobus revised this gist
Feb 12, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -50,7 +50,7 @@ From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/apache-spark Create ipython profile ---------------------- Since [profiles are not supported](http://jupyter.readthedocs.io/en/latest/migrating.html#since-jupyter-does-not-have-profiles-how-do-i-customize-it) in `jupyter` and now you can see following deprecation warning ```shell $ ipython notebook --profile=pyspark [TerminalIPythonApp] WARNING | Subcommand `ipython notebook` is deprecated and will be removed in future versions. -
ololobus revised this gist
Feb 12, 2017 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -30,7 +30,6 @@ Add following code to your e.g. `.bash_profile` # For a ipython notebook and pyspark integration if which pyspark > /dev/null; then export SPARK_HOME="/usr/local/Cellar/apache-spark/2.1.0/libexec/" export PYTHONPATH=$SPARK_HOME/python:$SPARK_HOME/python/build:$PYTHONPATH export PYTHONPATH=$SPARK_HOME/python/lib/py4j-0.10.4-src.zip:$PYTHONPATH fi
NewerOlder