User Tools

Site Tools


wphase:macos

Install W-phase dependencies on MacOS using homebrew and pip

Before reading this, you should first read the W-phase documentation page.

The instructions below have not yet been rigorously tested, please report any problem to Zacharie Duputel zacharie.duputel@unistra.fr or Luis Rivera luis.rivera@unistra.fr.

Install Homebrew

For detailed information, please refer to http://brew.sh and https://github.com/Homebrew/homebrew

Pre-requirements:

  • An Intel CPU 1
  • OS X 10.6 or higher 2
  • Command Line Tools for Xcode: xcode-select –install, https://developer.apple.com/downloads or Xcode 3
  • A Bourne-compatible shell for installation

To install homebrew, in bash:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

To check if everything is OK, use:

brew doctor

Install gcc, python, pip, etc.

To install gcc-4.9 and python2.7:

brew install gcc
brew install python

Homebrew installs pip with python.

Install required python modules using pip:

pip install numpy
pip install matplotlib
pip install basemap --allow-external basemap --allow-unverified basemap

We will also need gmt4:

brew install gmt4

As indicated in the documentation page, the GMT_BIN environment variable should point to appropriate GMT bin directory (e.g., “/usr/local/bin” or “/usr/local/Cellar/gmt4/4.5.13/bin”).

To install GNU core utilities:

brew install coreutils

Then:

brew tap homebrew/dupes
brew install ghostscript
brew install binutils
brew install diffutils 
brew install ed --default-names 
brew install findutils --default-names 
brew install gawk 
brew install gnu-indent --default-names 
brew install gnu-sed --default-names 
brew install gnu-tar --default-names 
brew install gnu-which --default-names 
brew install gnutls --default-names 
brew install grep --default-names 
brew install gzip 
brew install screen 
brew install watch 
brew install wdiff --with-gettext 
brew install wget

Finally, add the following lines to your .bashrc file:

export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export LD_INCLUDE_PATH=/usr/local/include:$LD_INCLUDE_PATH

Installing the W-phase code

  • Before compiling the code, replace “gcc” by “gcc-4.9” in src/Makefile (or any other recent version gcc of installed with homebrew).
  • You can then compile the W-phase code as explained in the documentation page.
wphase/macos.txt · Last modified: 2015/02/03 08:23 by wphase