Tag Archives: homebrew

Installing NumPy and SciPy on Mac OSX 10.8 (Mountain Lion)

I am playing with ExpEyes, which is awesome tool for anyone who wants to learn electronics (and physics).

ExpEyes comes with software (written in python) for GNU/Linux and Windows. I intend to run it on Mac OSX, because it can (provided all dependencies are met).

It is generally easy to install python packages on OSX using easy_install or pip, however, installing NumPy and SciPy turned out to be pain on OSX (10.8.2, latest version the time of posting).

In my case, I am using python binary installed via homebrew, so I can’t take advantage of numpy (which comes installed with mountain-lion).

I have XCode 6 installed, which comes with gcc-4.2.1 (llvm build). I figured out, I can build numpy and scipy from source.

Following is what I did to build numpy and scipy. SciPy requires gfortran, so that has to be installed (I used homebrew to do that):

$ git clone https://github.com/numpy/numpy.git
$ git clone https://github.com/scipy/scipy.git
$ cd numpy
$ python setup.py build && python setup.py install
$ brew install gfortran
$ cd ../scipy
$ python setup.py build && python setup.py install

BTW! In case, you are wondering, why didn’t I use Scipy Superpack script, which indeed makes job easier?

I didn’t, because I want to install gnu/unix packages using homebrew, and I already have git and other things. Super Spicypack downloads (gfortran, etc.), builds and installs packages directly to system, making it harder to remove those later? Homebrew makes job easier.

Installing Riak on Mac OSX

I am evaluating various nosql solutions for our existing/new projects. Bluesmoon recommended about Riak which is an awesome nosql datastore/database (and lot more).  I couldn’t wait to check it out.

As usual, I relied on Homebrew – the best package manage for OSX – to install applications/libraries. While installing, I got an error:

$ brew install riak
$ ...
$ Error: Failed executing: make all rel

After searching for a while, I figured out that there are known issues. With the help of Adam‘s comment on github, I was able to install Riak finally.

We make brew ignore Riak’s dependencies while building it.

Following commands should build and install Riak:

$ brew update
$ brew install erlang
$ brew install --HEAD --ignore-dependencies riak -v