homebrewでnumpy/matplotlabのインストール

以下を参照.パーミッションエラーが起きるけど,無視して進んでOK.パーミッションを正しく(?)設定していると,brew linkをしてくださいと言われるので,従う.
http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/

  • Homebrewのインストール
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
    • Pathの設定:
export PATH=/usr/local/bin:$PATH
brew install git
brew install readline sqlite gdbm pkg-config
brew install python --framework --universal

利用されるpythonのバージョンを変更する

cd /System/Library/Frameworks/Python.framework/Versions
sudo rm Current
ln -s /usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/Current
  • pip&numpyのインストール
    • (注1) which easy_install をして,"/usr/local/share/python/easy_install" である事を確認する."/usr/bin/easy_install" を指している場合には,shell profileを読みなおすか,shell を再起動.
easy_install pip
    • (注2) which pip をして,/usr/local/share/python/pip を指している事を確認する
pip install numpy
  • scipyのインストール
brew install gfortran
pip install -e git+https://github.com/scipy/scipy#egg=scipy-dev
  • matplotlibのインストール
pip install -e git+https://github.com/matplotlib/matplotlib#egg=matplotlib-dev
  • ipythonのインストール
pip install ipython
brew install pyqt
    • qtのインストールがスタートするので,非常〜に時間がかかります.諦めずに放置して寝ましょう.
brew install zmq
pip install pyzmq
pip install pygments
  • 起動!
ipython qtconsole --pylab=inline

こんな感じになります.