Home > Uncategorized > Install Matplotlib, Scipy on Mac

Install Matplotlib, Scipy on Mac

February 12, 2012 Leave a comment Go to comments

Struggling for a while to install matplotlib on my mac, finally find this one works:

First install brew: <http://mxcl.github.com/homebrew>

And following the instruction posted here.

$ brew install python
 $ brew install gfortran
 $ brew install pkg-config
 $ easy_install pip
 $ pip install numpy
 $ cd $HOME
 $ git clone https://github.com/matplotlib/matplotlib.git
 $ cd matplotlib
 $ python setup.py build
 $ python setup.py install

Well, then continue for my scipy 🙂

Here’s a ‘investigation‘ that i found, very useful. The official scipy/numpy site only say that CC, XCC, etc needs to be changed, but not for the fortran part. For my case, I did’t export the CC, etc — it not works for me, but I deed have fcompile specified.

mkdir ~/tmp
cd ~/tmp
git clone https://github.com/scipy/scipy.git
cd scipy
python setupegg.py build --fcompiler=gfortran
sudo python setupegg.py install

Install nose:

sudo pip install nose
Categories: Uncategorized Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: