How to install latest Apache Spark on Mac OS

Install Latest Apache Spark on Mac OS

Following is a detailed step by step process to install latest Apache Spark on Mac OS. We shall first install the dependencies : Java and Scala. To install these programming languages and framework, we take help of Homebrew and xcode-select.

Install Spark on Mac OS - Apache Spark Tutorial - www.tutorialkart.com

Install Spark on Mac OS

  • Step 1 : Install Homebrew

    Open Terminal.
    Run the following command in Terminal :

    /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

    Enter the password if asked and continue.

  • Step 2 : Install xcode-select

    To install Java, Scala and Apache Spark through command line interface in Terminal, we shall install xcode-select. Enter and run the following command in Terminal :

    xcode-select –install
  • Step 2 : Install Java

    To install Java through command line, enter and run the following command in the Terminal :

    brew cask install java
  • Step 3 : Install Scala

    To install Scala through command line, enter and run the following command in Terminal :

    brew install scala
  • Step 4 : Install Spark

    To install Apache Spark through command line, enter and run the following command in the Terminal :

    brew install apache-spark
  • Step 5 : Verifying installation

    To verify if the installation is successful, run the spark using the following command in Terminal :

    spark-shell

We have successfully installed Apache Spark on Mac OS.

The installation directory would be /usr/local/Cellar/apache-spark/.

Conclusion :

In this Apache Spark Tutorial, we have learnt to install latest Apache Spark on Mac OS .