Octave for macOS (outdated)

From Octave
Revision as of 10:23, 16 May 2020 by Siko1056 (talk | contribs) (Add "MacPorts: Custom Installation Instructions" from Octave for macOS.)
Jump to navigation Jump to search
Warning icon.svg
This article is about using outdated installation methods of Octave for macOS; for current instructions, see Octave for macOS.

Octave 4.2.2 VM installer for Mac OS X 10.10 Yosemite, 10.11 El Capitan, 10.12 Sierra, 10.13 High Sierra

Point and click configuration files that cause Vagrant to automatically download and configure an Octave 4.2.2 server VM under OS X including 10.10 Yosemite, 10.11 El Capitan, 10.12 Sierra and 10.13 High Sierra. The install process pulls down Octave 4.2.2 from the repository. All software used in running this server VM is open source (Vagrant, VirtualBox, Octave). The Octave GUI and graphics will display seamlessly on the Mac via the Mac's native X-windows server, while the server runs headless. The recommended configuration ensures that by default user files written by the GUI are in a folder shared with the Mac's filesystem, and the VM suspends automatically when the user quits the GUI. Any edited files then persist in the Mac's shared folder.

Binary installer for OS X 10.9.1

A binary installer for Mavericks can be found on Octave Forge.

This installer will install all binaries for GNU Octave 3.8.0 itself and its dependencies under

 /usr/local/octave/3.8.0 

And will create two entries in the Applications folder

/Applications/Octave-cli.app 
/Applications/Octave-gui.app 

Which will start Octave in CLI and GUI mode respectively, these are just small wrappers containing a startup script and an icon to allow launching Octave from the Finder.

If you wish to uninstall GNU Octave 3.8.0 and all other software installed by this installer you can simply move the three folders listed above to the Trash. Notice that you will need to authenticate with an administrator password to be allowed to do so.

You may need to override Gatekeeper to allow installation. You may find instructions about how to do this on this page in the section labeled "How to open an app from a unidentified developer and exempt it from Gatekeeper".

In short:

  • In Finder, Control-click or right click the icon of the app.
  • Select Open from the top of contextual menu that appears.
  • Click Open in the dialog box. If prompted, enter an administrator name and password.

This installer is known to work on OS X 10.9.1, you may try, at your own risk, to use it for installing on other system versions but it is not guaranteed to work.

MacPorts: Custom Installation Instructions

For best performance, variability and reliability the custom installation is suggested.

Preliminary Port Installations

  • The new Octave 4 port relies on the accelerator variant. Unfortunately this variant is known for some problems (see below). A better alternative is the "atlas" port, it is necessary to build it with the here specified variant prior to the Octave port installation: sudo port install atlas +gcc5. This can last for many hours. Do this overnight. If a prior atlas installation failed, do sudo port clean atlas before reinstallation.
  • Octave depends on arpack, too. Unfortunately arpack is installed with the accelerate variant by default. The accelerate variant uses Apple's Vector Libraries which have some known bugs that can cause Octave to crash if using certain functions in arpack. To avoid this install arpack with the atlas variant instead of the accelerate variant sudo port install arpack -accelerate+atlas. You can even do this after you installed Octave. The new variant become active by default.

Octave Installation

  • MacPorts has good support for Octave. A list of what MacPorts has available for Octave is here. To install the most recent version of Octave, type sudo port install octave -accelerate+atlas at the Terminal's command line. Octave has many dependencies which will be downloaded and installed prior to Octave. The entire installation process can take some time.
  • Note that octave-devel has been replaced by octave, see MacPorts Revision 114034.
  • The variant installed may be important to the user's experience. The available variants for octave are displayed by typing port variants octave. In MacPorts 2.3.4 the variants accelerate, app, docs, fltk, gfortran, graphicsmagic, qt4gui and sound are installed by default (marked with '+' sign in port variants octave output). If you need Java support add the new Java variant (+java). A installed Java JRE is mandatory. Go To the Oracle Java website for Download. The following command works fine: sudo port install octave -accelerate+atlas+java
  • If Octave crashes when plotting use the Gnuplot graphic toolkit instead of FLTK. Type graphics_toolkit('gnuplot') in Octave before plotting. For using the nicer wxt-terminal of Gnuplot, type setenv("GNUTERM","wxt") in Octave. To make this the standard behavior append both commands in one of Octave's startup files e.g. your ~/.octaverc. To close the graphic window of gnuplot use the Octave command close() to get rid of the Gnuplot instance instead of using the close button of the window.
  • The first plot after startuing Octave 4 can last a while.

To get detailed instructions from start to end on one page, refer Hani's Omnium Gatherum.