Python Install libraries
Installing numpy, scipy, matplotlib and Basemap on Mac OS X can be challenging.
Installation using homebrew
This installation path should work for all versions of Mac OS X, because every library involved and the python interpreter is self-compiled. Make sure to use the system compiler to be compatible to system libraries.
- Install  using the default settings.
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
- Install necessary libraries and python.
brew install gfortran python geos
- Install numpy via the python package manager pip which homebrew installed automatically with python.
pip install numpy
- Install scipy
pip install scipy
- Install matplotlib
pip install matplotlib
- Install ipython (not necessary, but recommended replacement for the standard python shell)
pip install ipython
- Install the python-imaging library, which is required for Basemap.
pip install PIL
- Basemap itself is unfortunately not available via pip, so you have to compile and install yourself. Download and extract the code from the sourceforge repository. Then in the extracted directory run
python setup.py build
python setup.py install
Follow the above commands in the opposite order and replace
- Make sure you have no other version of gcc installed. Check the output of
- to make sure to use the system compiler.
- Do not mix pre-compiled and self-compiled libraries.