![]() If you’re interested in learning Python for Data Science and Machine learning, check out my course here. I’m Jose Portilla, and I teach over 200,000 students about programming, data science, and machine learning on Udemy. Just type that straight into your terminal. At the time of writing this tutorial, the version of IntelliJ is version 15. Homebrew should have taken care of all of this, but in case you need to add spark to your PATH, you’ll want to use: export SPARK_HOME=/usr/local/Cellar/apache-spark/2.0.1/libexecexport PYTHONPATH=/usr/local/Cellar/apache-spark/2.0.1/libexec/python/:$PYTHONP$ Here is a Step by Step guide to installing Scala and Apache Spark on MacOS. Install IntelliJ for Mac To install the IntelliJ IDE, open a browser and navigate to the download page from the JetBrains website. You can confirm that it is working by typing the scala code: val s = "hello world" The script will require some changes to make it work for scala 2.12. rb script has hardcoded older version of scala. _/\_,_/_/ /_/\_\ version 2.0.1 /_/ Using Scala version 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_102)Type in expressions to have them evaluated.Type :help for more information. Just executing the steps in the link won't install scala 2.12. You should see a flood of text and warnings but eventually see something like this: Welcome to _ _ / _/_ _ _/ /_ _\ \/ _ \/ _ `/ _/ '_/ /_/. Homebrew will now download and install Apache Spark, it may take some time depending on your internet connection. Now with Scala installed go to your terminal and type: brew install apache-spark Now with Homebrew installed go to your terminal and type: brew install scala Step 5: Use Homebrew to install Apache Spark After running this Homebrew should have taken care of the Java install. You may need to enter your password at some point to complete the java installation. In your terminal type: brew cask install java The easiest way to install it is to just use HomeBrew: Scala is dependent on Java, you may or may not need to install it. You will get a prompt that looks something like this: The bundle contains the lastest release version of the Scala IDE for Eclipse and it comes pre-configured for optimal performance. Go to you terminal and type: xcode-select -install In order to install Java, Scala, and Spark through the command line we will probably need to install xcode-select and command line developer tools. Installing everything through Homebrew should automatically add all the appropriate PATH settings to your profile. Scala editor for macOS / Mac OS X, Windows, and Linux includes features such as syntax highlighting, a Scala method navigator, Scala code inserts, and more. There are more detailed instructions on installing on the project’s GitHub page. ![]() ![]() Which basically just tells you to open your terminal and type: /usr/bin/ruby -e "$(curl -fsSL )" You can get Homebrew by following the instructions on it’s website. Homebrew makes your life a lot easier when it comes to installing applications and languages on a Mac OS. Here is a Step by Step guide to installing Scala and Apache Spark on MacOS. There will be a lot more on how to use Spark and how to use Spark with Oracle (all their big data stuff) over the coming months.By Jose Marcial Portilla How to Install Scala and Apache Spark on MacOS # Copyright(c) Oracle Corporation 1998,2016. Lines: .RDD = docker_ora_db.txt MapPartitionsRDD at textFile at :24 Scala> val lines = sc.textFile("docker_ora_db.txt") Whereami: String = /Users/brendan.tierney Scala> val whereami = System.getProperty("user.dir") Now you can start the Apache Spark shell. Xcode-select: error: command line tools are already installed, use "Software Update" to install updates If it already installed then nothing will happen and you will get the following message. This tool allows you to install the languages using command line. Download and use Scala with IntelliJ and then build a project, then test it. You may have xcode-select already installed. When prompted enter your system/OS password to allow the install to proceed. Homebrew seems to be the standard for installing anything on a Mac. This allows me to play with Apache Spark on my laptop (single node) before deploying my code to a multi-node cluster. The following outlines the steps I’ve followed to get get Scala and Apache Spark installed on my Mac. Installing Scala and Apache Spark on a Mac
0 Comments
Leave a Reply. |