Octave for macOS: Difference between revisions

881 bytes added ,  23 February 2015
→‎Homebrew: I have explained the experimental built-in GUI by octave and the optional java dependency. Since gcc and gfortran are included in the octave formula, you don't need to install them manually, so I removed it .
(→‎Homebrew: I have explained the experimental built-in GUI by octave and the optional java dependency. Since gcc and gfortran are included in the octave formula, you don't need to install them manually, so I removed it .)
Line 97: Line 97:
<pre>brew tap homebrew/science</pre>
<pre>brew tap homebrew/science</pre>


To install Octave, update to the latest package definitions, install {{Codeline|gfortran}}, and then Octave:
To install Octave, update to the latest package definitions, install {{Codeline|gfortran}} (Now you don't need to install it manually, it would be installed by dependency), and then Octave:
<pre>brew update && brew upgrade
<pre>brew update && brew upgrade
brew install gcc
brew install octave</pre>
brew install octave</pre>
This would install octave with the default dependencies. Note that the default dependencies include java runtime environment. If you do not have java installed, homebrew would guide you to do that. Or you can type {{Codeline|brew install octave --without-java}} to remove its dependency on java.
By default octave does not include docs (used by `help` function) because it requires an entire LaTex environment. If you have MacTex installed (or homebrew would guide you to install it), you can add {{Codeline|--with-docs}} to the installation script:
{{brew install octave --with-docs --without-java}}


Note: If brew complains about not having a formula for octave, the following command should fix it:
Note: If brew complains about not having a formula for octave, the following command should fix it:
Line 106: Line 108:


The command below upgrades Octave and its dependencies to the latest Homebrew-supported versions:
The command below upgrades Octave and its dependencies to the latest Homebrew-supported versions:
brew update && brew upgrade
<pre>brew update && brew upgrade</pre>


Octave has many dependencies which will be downloaded and installed prior to Octave. The entire installation process can take a few hours.
Octave has many dependencies which will be downloaded and installed prior to Octave. The entire installation process can take a few hours.
Octave has an experimental built-in GUI (developed using Qt lib) installed by default so that gnuplot and other tools could use it directly. So you do not need to install a X server in the most situations.
Note: On Snow Leopard, Octave requires a X server. If you install without, Homebrew will guide you to the XQuartz project (https://xquartz.macosforge.org) where you can download this.
Note: On Snow Leopard, Octave requires a X server. If you install without, Homebrew will guide you to the XQuartz project (https://xquartz.macosforge.org) where you can download this.


Anonymous user