How to install NumPy, SciPy and Matplotlib with HomeBrew
- gfortran and swig is required.
- umfpack required in numpy is in suite-sparse package in homebrew.
- suite-sparse and gfortran formulas are moved to sub repository named science.
- scipy depends on numpy, but pip doesn’t solve it.
- The file npymath.ini is required by SciPy, but current numpy formula doesn’t leave the file. So we install numpy of develop version from github directly.
- matplotlib requires freetype2 and libpng.
So, you can install NumPy, SciPy and Matplotlib with HomeBrew like below.
> brew tap homebrew/science > brew install gfortran suite-sparse swig freetype libpng > pip install -e git+https://github.com/numpy/numpy#egg=numpy-dev > pip install scipy matplotlib
Note: don’t delete src directory created by pip.
You can install SciPy of develop version. It is not required.