it works now with macports:
sudo port install -u opencv +python26 +tbb
This post is certainly obsolete...
compiling here along with MacTex...
svn co https://code.ros.org/svn/opencv/trunk/opencv cd opencv # the directory containing INSTALL, CMakeLists.txt etc. mkdir build cd build cmake -D CMAKE_OSX_ARCHITECTURES=x86_64 -D WITH_FFMPEG=ON -D BUILD_EXAMPLES=ON -D BUILD_LATEX_DOCS=ON -D PDFLATEX_COMPILER=/usr/texbin/pdflatex -D BUILD_NEW_PYTHON_SUPPORT=ON -D PYTHON_LIBRARY=/opt/local/lib/libpython2.6.dylib -D PYTHON_INCLUDE_DIR=/opt/local/Library/Frameworks/Python.framework/Headers .. make -j4 sudo make install
I had to rebuild some ports
sudo port install ilmbase port provides /opt/local/lib/libIlmImf.dylib sudo port install openexr sudo port install libdc1394
then could run
cd ../samples/python/ python camera.py
another route is homebrew: http://gist.github.com/519418 / :
$ brew info opencv opencv 2.1.1-pre http://opencv.willowgarage.com/wiki/ Depends on: cmake, pkg-config, libtiff, jasper, tbb /usr/local/Cellar/opencv/2.1.1-pre (96 files, 37M) The OpenCV Python module will not work until you edit your PYTHONPATH like so: export PYTHONPATH="/usr/local/lib/python2.6/site-packages/:$PYTHONPATH" To make this permanent, put it in your shell's profile (e.g. ~/.profile). http://github.com/mxcl/homebrew/commits/master/Library/Formula/opencv.rb