A fresh installation of Mac OS X (El Capitan in my case) doesn’t come with many tools that are used in science….gnuplot, xmgrace, pylab, gsl, just to name a few.
The installation of Homebrew is the first step (Macport is also a valid alternative, but it will use more space on your Mac). First of all, you need to download Xcode from the App store (it’s free). When the download is completed, open Xcode and let it install other required components.
Once the installation is completed, open the Terminal application and in the terminal window, simply run the command
$ sudo xcodebuild -license
scroll to the end and type “agree”.
We are finally ready to install homebrew. In the terminal window, type
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Press return and just follow the instructions on the screen.
After the installation has completed, you can search the catalog of available programs with “brew search”.
For example, to search for the gsl libraries, run
$ brew search gsl
or to install
$ brew install gsl
Once the installation has finished, the gsl libraries are ready to be used.