I want to install Spark on my PC.
Preparation
I read chapter 2 of O’Reilly’s Learning Spark.
Method
-
Download Java from here and install it to a directory with no spaces in the path, e.g.,
C:\Java
.If the directory contains space, the Spark shell may fail with an error described here.
- Create system variable
JAVA_HOME
and set it to the path in which Java is just installed. - Download Spark from here and unzip it to a directory with no spaces in the path, e.g.,
C:\Spark
. - Add the
bin
folder in the Spark installation to environment variables. - Open
cmd
and typepyspark
to open the Python version of Spark shell or typespark-shell
to open the Scala version.
Result
Python version of the Spark shell.
Scala version of the Spark shell.