Skip to content
This repository was archived by the owner on Dec 21, 2017. It is now read-only.

Commit cd193ba

Browse files
author
tiffanyj41
committed
Update using_notebook.md
1 parent 7e33cb1 commit cd193ba

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docs/using_notebook.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,26 @@
44
2. Launch Anaconda luncher
55
3. Launch ipython-notebook
66
4. Create an iPython profile for use with PySpark
7+
1. Make sure you have exported PySpark classes to your python path and build Apache Spark.
8+
To export PySpark classes, add the following to your ~/.bash_profile:
79

10+
```bash
11+
# export spark to path
12+
export SPARK_HOME=/path/to/your/spark
13+
export PATH=$PATH:$SPARK_HOME/bin
14+
# export pyspark classes to the python path
15+
export PYTHONPATH=$SPARK_HOME/python:$PYTHONPATH
16+
# export py4j to the python path
17+
export PYTHONPATH=$SPARK_HOME/python/lib/py4j-<version_number>-src.zip:$PYTHONPATH
18+
```
19+
20+
2. Build Apache Spark
21+
22+
```bash
23+
$ cd $SPARK_HOME
24+
$ sbt/sbt clean assembly
25+
```
26+
827
```bash
928
ipython profile create pyspark
1029
```

0 commit comments

Comments
 (0)