To install GNU Octave on a Mac is not as easy as on Microsoft Windows® or GNU/Linux.
Ready-to-use App bundles are outdated and/or do not run reliably. The installation with a package manager as MacPorts or Home Brew does not work out-of-the-box.
GNU Octave on Mac OS X. News from Octave Home. Octave.app from Octave forge on sf.net. Octave.app is available on GNU Octave Repository - Browse /Octave MacOSX Binary at SourceForge.net. Some functions are not available on Octave.app 3.4.x (imread, imwrite.). If you want to use these functions, you can employ octave.app 3.2.3.
This How-To describes how to install Octave 4.0.3 with MacPorts (Version 2.3.4) on Mac OS X 10.11 (El Capitan). It shows how to avoid pitfalls and workaround bugs.
If you have Octave built with Qt support (which is the default for Homebrew and Octave.app installs on Mac), you can run it with octave -gui from the command line, or by double-clicking the Octave.app icon in /Applications. The installation instructions in that link are out of date. Octave.app Octave.app is a project to bundle and distribute GNU Octaveas a native Mac GUI application. This makes it easy to install and use GNU Octave on Mac. Octave-app-bundler uses Homebrew to build and install Octave and all its dependencies. This is done in a separate Homebrew prefix under the target application so it doesn't interfere with any existing Homebrew installations. It then bundles those programs as a macOS app bundle, and creates an installer DMG using andreyvit's create-dmg tool. OctavePrerequisiteInstallation This guide covers the basics of setting up a development environment on a new Mac. Whether you are an experienced programmer or not, this guide is intended for everyone.
The old how-to Install Octave 3 on Mac OS X El Capitan is obsolete now.
I already updated the Octave Wiki based on this how-to. But that description is brief. Here you find the detailed instructions.
First: Take your time. The installation and more important, the compilation of some parts take several hours. Be patient.
About MacPorts
MacPorts is a package manager which is based on BSD-Unices.It provides UNIX programs in packages – so-called “ports” – which are not distributed by Apple. Due to the fact that MacPorts provides the sources only, it is necessary to compile them. This takes longer than just download an already compiled app bundle. But do not worry, all these is done semi-automatically by typing a few commands.
MacPorts installs the ports and itself in the directory /opt/local which you can not view by the Finder directly. But in the case of GUI-Programs MacPorts provides App Bundles in the Program directory for easy access.
Install MacPorts
- We need the “Xcode Developer Tools” first. Since OS X 10.9 (Mavericks) you do not need to install Xcode to get the “Xcode Developer Tools”. Open a Terminal (Applications/Utilities) and type the following command:and follow the displayed instructions to install the tools . Then type:and confirm with “agree” and ENTER.
- Now download MacPorts for your Mac OS X version and run the PKG-installer.
- After the installation process finished MacPorts is installed on your Mac.
Install the “Octave” Port
Basic Installation
The new Octave 4.0.3 should install out-of-the-box with:
The basic installation may work for most people. But for some reasons the next lines are worth reading.
Custom Installation
The new Octave port is compiled with the accelerate variant by default. This might cause problems later. For this reason the atlas variant is a better choice. But it will consume more (compilation) time.
- The port “atlas” – an import math library – does not compile with the default variant. You need to to choose the gcc5 variant. Type in the Terminal:Note: The compilation of “atlas” lasts for a lot of hours, even on modern hardware. I recommend to run this command over night.
- Another dependency of Octave which could make problems later by using Octave is the math library “arpack”. Per default it will be compiled with Apple’s accelerate variant which is buggy. Compile it with atlas:It is also possible to run this command after the installation of Octave.
- Now all preliminaries are finished and you can install Octave itself. Now the graphical user interface (GUI) will be installed by default. But for using the atlas library and the Java dialog functions I recommend to install Octave with the following variants:The compilation of Octave lasts some time but not as much as “atlas” by far.
- After the installation finished you find an app bundle of Octave in the Launchpad and in the directory “Applications”. It is also possible to run the command-line version of Octave in the terminal by typing the command octave.
![Mac Mac](https://screenshots.macupdate.com/JPG/61846/61846_1590662263_scr.jpg)
For the Java dialog functions you need a Java JRE installed. Download it from Oracle.
Peculiarities
After starting Octave I noticed some peculiarities. Most of them are from optical nature:
- The first plot lasts a while after starting Octave. The next one appears immediately. Windows users have the same problem.
- The font size of the command window is even on my non-retina Macbook to small by far. But you can correct this in the settings.
- Labels in buttons, in the editor’s submenu and other widgets are not centered vertically (Screenshot).
In comparison to the GNU/Linux or even the Windows® version Octave looks less polished on a Mac via MacPorts. I read that via Home Brew similar effects were observed.
Improvements in comparison to version 3.8.3
In comparison to version 3.8.2 some bugs and peculiarities are removed:
- Plotting works out-of-the-box.
- Octave gets the focus after starting now and is not coated by the current window anymore.
- The error message after closing the settings dialog box is gone.
- The command cd seems not to be ignored in the start file ~/.octaverc anymore.
Update Problems from 3.8.2
If you have problems from the old 3.8.3 port because of incompatible variants, refer Octave 4 upgrade via MacPorts fails after “port upgrade outdated”
Related Links
Community packages
These packages are maintained by a community of Octave Forge and Octave developers in a spirit of collaboration. The main repository for development is located at Octave Forge and the packages share Octave's bug and patch tracker. Community packages are coordinated between each other and with Octave regarding compatibility, naming of functions, and location of individual functions or groups of functions.
See also: external packages, unmaintained packages
arduino
Basic Octave implementation of the matlab arduino extension, allowing communication to a programmed arduino board to control its hardware
audio
Audio and MIDI Toolbox for GNU Octave
cgi
Common Gateway Interface for Octave
communications
Digital Communications, Error Correcting Codes (Channel Code), Source Code functions, Modulation and Galois Fields
control
Computer-Aided Control System Design (CACSD) Tools for GNU Octave, based on the proven SLICOT Library
data-smoothing
Algorithms for smoothing noisy data
database
Interface to SQL databases, currently only postgresql using libpq
dataframe
Data manipulation toolbox similar to R data.frame
dicom
Digital communications in medicine (DICOM) file io
doctest
Find and run example code within documentation
econometrics
Econometrics functions including MLE and GMM based techniques
fem-fenics
pkg for the resolution of partial differential equations based on fenics
financial
Monte Carlo simulation, options pricing routines, financial manipulation, plotting functions and additional date manipulation tools
fuzzy-logic-toolkit
A mostly MATLAB-compatible fuzzy logic toolkit for Octave
ga
Genetic optimization code
general
General tools for Octave
generate_html
This package provides functions for generating HTML pages that contain the help texts for a set of functions
geometry
Library for extending MatGeom functionality
gsl
Guitar scales app mac. Octave bindings to the GNU Scientific Library
image
The Octave-forge Image package provides functions for processing images
image-acquisition
The Octave-forge Image Aquisition package provides functions to capture images from connected devices
instrument-control
Low level I/O functions for serial, i2c, spi, parallel, tcp, gpib, vxi11, udp and usbtmc interfaces
interval
The interval package for real-valued interval arithmetic allows one to evaluate functions over subsets of their domain
io
Input/Output in external formats
level-set
Routines for calculating the time-evolution of the level-set equation and extracting geometric information from the level-set function
linear-algebra
Additional linear algebra code, including matrix functions
lssa
A package implementing tools to compute spectral decompositions of irregularly-spaced time series
mapping
Octave.app For Macbook Pro
Simple mapping and GIS .shp .dxf and raster file functions
miscellaneous
Miscellaneous tools that don't fit somewhere else
mvn
Multivariate normal distribution clustering and utility functions
netcdf
A NetCDF interface for Octave
ocl
Stock submitter app mac. Package using OpenCL for parallelization, mostly suitable to Single-Instruction-Multiple-Data (SIMD) computations, selectively using available OpenCL hardware and drivers
optics
Functions covering various aspects of optics
optim
Non-linear optimization toolkit
optiminterp
An optimal interpolation toolbox for octave
parallel
Parallel execution package
quaternion
Quaternion package for GNU Octave, includes a quaternion class with overloaded operators
Download Octave For Mac
queueing
The queueing package provides functions for queueing networks and Markov chains analysis
signal
Signal processing tools, including filtering, windowing and display functions
sockets
Socket functions for networking from within octave
sparsersb
Interface to the librsb package implementing the RSB sparse matrix format for fast shared-memory sparse matrix computations
splines
Additional spline functions
statistics
Additional statistics functions for Octave
strings
Additional functions for manipulation and analysis of strings
struct
Additional structure manipulation functions
symbolic
Adds symbolic calculation features to GNU Octave
video
A wrapper for OpenCV's CvCapture_FFMPEG and CvVideoWriter_FFMPEG
vrml
Octave Install
3D graphics using VRML
windows
Provides COM interface and additional functionality on Windows
zeromq
ZeroMQ bindings for GNU Octave