largecats' blog data engineer

Installing Spark on Windows

2019-07-31

I want to install Spark on my PC.

Preparation

I read chapter 2 of O’Reilly’s Learning Spark.

Method

  1. 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.

  2. Create system variable JAVA_HOME and set it to the path in which Java is just installed.
  3. Download Spark from here and unzip it to a directory with no spaces in the path, e.g., C:\Spark.
  4. Add the bin folder in the Spark installation to environment variables.
  5. Open cmd and type pyspark to open the Python version of Spark shell or type spark-shell to open the Scala version.

Result

Python version of the Spark shell.

Scala version of the Spark shell.

Similar Posts

Content