The QUICK version

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew doctor
brew install qt --with-developer --with-docs --HEAD
brew install cmake boost boost-python ftgl freetype readline sip pyqt
brew tap homebrew/science && brew install hdf5 jpeg libtiff fftw gsl
brew install git cvs doxygen gnu-indent cscope
brew linkapps && brew cleanup && brew doctor
sudo easy_install pip
sudo -H pip install “ipython[all]” matplotlib spicy numpy gnureadline —upgrade
sudo -H pip install PyOpenGL PyOpenGL-accelerate --upgrade

Download Berkeley DB 5.3.28.tar.gz (instructions above)

tar -xf db-5.3.28
cd db-5.3.28
cd src/dbinc
curl -O https://raw.githubusercontent.com/narkoleptik/os-x-berkeleydb-patch/master/atomic.patch
patch atomic.h < atomic.patch
cd ../../build_unix
../dist/configure
make
sudo make install
sudo -H pip install bsddb3 --upgrade