Posted  by  admin

Download Ipython Notebook For Mac

The Jupyter Notebook is a web-based interactive computing platform. The notebook combines live code, equations, narrative text, visualizations, interactive dashboards and other media. 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.0112.

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.

Download Ipython Notebook For Mac

Install Java Development Kit

Download and install it from

Add following code to your e.g. .bash_profile

Install Apache Spark

You can use Mac OS package manager Brew (

Set up env variables

Add following code to your e.g. .bash_profile

You can check SPARK_HOME path using following brew command

Also check py4j version and subpath, it mau differ from version to version.

Ipython profile

Since profiles are not supported in jupyter and now you can see following deprecation warning

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.

Run ipython

Initialize pyspark

sc variable should be available


Ipython Notebook Windows

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:

and then simply run

which will open a web notebook with sc available automatically.