Based on http://jjyap.wordpress.com/2014/02/21/installing-opencv-2-4-8-on-mac-osx-with-python-support/
- edit
.bashrc
or.bash_profile
to include:export PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Python/2.7/site-packages/:$PATH"
brew update
brew tap homebrew/science
brew install opencv
cd /Library/Python/2.7/site-packages/
ln -s /usr/local/Cellar/opencv/2.4.9/lib/python2.7/site-packages/cv.py cv.py
ln -s /usr/local/Cellar/opencv/2.4.9/lib/python2.7/site-packages/cv2.so cv2.so
To verify, run python
and try import cv2
. If it doesn’t throw a No module named cv2
error, you’re good.
Thanks.
Here's my version of linking opencv with virtualenv-ed python, gist link