/ Octave

Installing Octave 4.2.1 on OS X Sierra

While installing Octave 3.8 on a Mac is quite straight forward ([Link to the installer](the Octave 3.8.0 installer)), newer versions can definitely induce some headaches.
The following tips helped me to get the latest version (4.2.1) up and running:

Note: For the install process we use Homebrew, which is a package manager for OS X.
More information: Homebrew Project Page.

You should know your way around Terminal to follow the instructions.

  1. Open Terminal
  2. Install Homebrew:
    ruby -e "$(curl --insecure -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    Use the following script if you want to uninstall Homebrew:
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)")
  3. Tap Homebrew Science: brew tap homebrew/science (more info)
  4. Be sure to be on the latest version brew update && brew upgrade
  5. We will need XQuartz: brew cask install XQuartz
  6. Now everything is ready for the install of octave: brew install octave
    (Depending on your machine this can take a long time (on my Macbook it took around 45 min), as some dependencies have to be compiled)
  7. Launch Octave from the Terminal: octave-cli