Octave for macOS: Difference between revisions

Jump to navigation Jump to search
295 bytes removed ,  26 April 2013
Line 62: Line 62:
[http://mxcl.github.com/homebrew/ Homebrew] has good support for Octave. To install Octave, you must first enable the scientific related formulae by typing at the Terminal's command line:
[http://mxcl.github.com/homebrew/ Homebrew] has good support for Octave. To install Octave, you must first enable the scientific related formulae by typing at the Terminal's command line:


{{Codeline|<nowiki>brew tap homebrew/science</nowiki>}}
brew tap homebrew/science


Then, if you do not have a fortran compiler installed, type
Then, if you do not have a fortran compiler installed, type


{{Codeline|<nowiki>brew install gfortran</nowiki>}}
brew install gfortran


Currently, linking Octave fails with the newest suite-sparse (4.1.0). As a solution, an older version can be installed.
Currently, linking Octave fails with the newest suite-sparse (4.1.0). As a solution, an older version can be installed.
First, versioning must be enabled and an older version has to be chosen (in this case, 3.7.0)
First, versioning must be enabled and an older version has to be chosen (in this case, 3.7.0)


{{Codeline|<nowiki>brew tap homebrew/versions</nowiki>}}
brew tap homebrew/versions
 
brew versions suite-sparse
{{Codeline|<nowiki>brew versions suite-sparse</nowiki>}}


Then go to the install directory of brew ({{Codeline|<nowiki>/usr/local</nowiki>}} by default) and get the formula for the older version (the revision number, {{Codeline|<nowiki>ff53163</nowiki>}},  is shown in the fourth column by in the previous command's output)
Then go to the install directory of brew ({{Codeline|<nowiki>/usr/local</nowiki>}} by default) and get the formula for the older version (the revision number, {{Codeline|<nowiki>ff53163</nowiki>}},  is shown in the fourth column by in the previous command's output)


{{Codeline|<nowiki>cd /usr/local/Library/Taps/homebrew-science/</nowiki>}}
cd /usr/local/Library/Taps/homebrew-science/
 
git checkout  ff53163 /usr/local/Library/Taps/homebrew-science/suite-sparse.rb
{{Codeline|<nowiki>git checkout  ff53163 /usr/local/Library/Taps/homebrew-science/suite-sparse.rb</nowiki>}}


Now compile and activate the selected version and install Octave
Now compile and activate the selected version and install Octave


{{Codeline|<nowiki>brew unlink suite-sparse</nowiki>}}
brew unlink suite-sparse
 
brew install -v ./suite-sparse.rb
{{Codeline|<nowiki>brew install -v ./suite-sparse.rb</nowiki>}}
brew switch suite-sparse 3.7.0
 
brew install octave
{{Codeline|<nowiki>brew switch suite-sparse 3.7.0</nowiki>}}
 
{{Codeline|<nowiki>brew install octave</nowiki>}}


Note that Octave has many dependencies which will be downloaded and installed prior to Octave. The entire installation process can take a few hours.
Note that Octave has many dependencies which will be downloaded and installed prior to Octave. The entire installation process can take a few hours.
364

edits

Navigation menu