Tech Notes: How to install SimpleCV on Mac(Mavericks)

Thu 07 August 2014
By leon

Document of a painful installation procedure, so hopefully someone saves the hassle to get SimpleCV working on my Mac Mavericks

There seems to be a lot of partial pieces of advice on installation in t'internet. So this is a filleted copy of my command history, I case I have to do this again.

Blindly pasting in these command one by one probably wont fix things for you.

Install simplecv

First I optimistically tried to install SimpleCV. Download simple cv unpack and

$ python ./ install

Blindly hoping that all requirements would be magically satisfied -- Obviously that didn't work :-/

I did have an install but errors when I ran the 'simplecv' command.

Needed to satisfy the missing requirements in order for SimpleCV to run.

Install pygame

satisfy requirements for pygame

brew install sdl sdl_image sdl_mixer sdl_ttf portmidi

lot of problems linking with libjpeg libpng after this. problem was due to permissions of this folder /usr/local/share/man/man5 relax the security on /usr/local/share/man/man5 (there are better ways than 777 I know eg chmod +w)

sudo chmod 777 /usr/local/share/man/man5

Then I have a error

Error: undefined method `opt_include' for jpeg:Jpeg

Then install pygame from source

pip install hg+

You'll need mercurial(hg) installed first to do this btw

brew install mercurial

Install opencv

A homebrew install of opencv didn't work for me

brew install opencv

Instead I installed open cv from source you'll need to install cmake first.

Download opencv from mac/linux version

Unzip it and cd into the directory. Then build and install...

$ mkdir build
$ cd build
$ cmake -G "Unix Makefiles" ..
$ make -j8
$ sudo make install

But still I was getting this error:

ImportError: Cannot load OpenCV library which is required by SimpleCV

Solved by symlinking and into the virtualenv

$ ln -s /usr/local/lib/python2.7/site-packages/ lib/python2.7/site-packages/
$ ln -s /usr/local/lib/python2.7/site-packages/ lib/python2.7/site-packages/

Install other required python libs via pip

$ pip install numpy scipy ipython

This worked for me (hopefully it will help you) :-) Here is the output from pip for version number reference

$ pip install IPython
$ pip freeze

now let's try out SimpleCV....

Proudly powered by Pelican, and Python. Reading Room Theme by Leon Harris