It is better than a nightmare from which you cannot wake up ...
$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Find problems and fix them (typically resulting from Homebrew becoming very stroppy if it does not have exclusive access to "
$ brew doctor
VERY IMPORTANT NOTE: Make ABSOLUTELY sure that the
DYLD_LIBRARY_PATHenvironmental variable is NOT set. Having this set will cause all sorts of problems as conflicts arise between libraries that homebrew installs that some of your other packages need (e.g.,
"libpng"and MacVim, respectively). Worse, some builds get confused and fail (e.g., "
matplotlib"). What happens if you need
DYLD_LIBRARY_PATHfor other applications? Please direct your questions to the homebrew folks.
Install Homebrew's Pythons:
$ brew install python $ brew install python3
Either create and source a virtual environment using Homebrew's Python:
$ virtualenv -p /usr/local/python3 homebrew-stats-computing $ . homebrew-stats-computing/bin/activate
Or make sure Homebrew's Python is at the head of the "
$ export PATH=/usr/local/bin:$PATH
$ brew install gfortran $ pip3 install numpy $ pip3 install scipy $ pip3 install pandas
$ pip3 install cython $ pip3 install patsy $ cd /tmp $ git clone https://github.com/statsmodels/statsmodels.git $ cd statsmodels $ python3 setup.py build $ python3 setup.py install
$ brew install libpng freetype pkgconfig $ cd /tmp $ git clone https://github.com/matplotlib/matplotlib.git $ cd matplotlib $ python3 setup.py install