If compiled by default, opencv will use the python-config shipped with OS X. with? "python" py_prefix = `python-config -prefix`. Search “python” in the document we may find a ruby block But I need it and I want to use my own distribution residing in /Library/Frameworks so we have to edit the formula: brew edit opencv3 If you don’t want to use python binding in OpenCV and only need C/C++ interface, you may add “–without-python” option. If you have your own numpy package at hand, you may add “–without-numpy” option. Installing OpenCV3 by default needs the numpy in homebrew/python/numpy. You could tap homebrew/python to get python packages, but I like to use pip instead. And in China we may suffer the bad network connection. There’re several points that may concern. Check it with brew or your other distribution.
Note if you want to use GUI function in python, like the matplotlib package, you may have to install packages pyobjc-framework-*. But the latter two distribution have the right directory permission, pip will work well. I previously installed python in the second way, so now I have to use pip with -user option to install all packages in my user folder. Since the first one is reserved by OS X and save package in root folder, I don’t want to use it and battle with the new SIP feature.
Brew install opencv 3 python download#
download the tarball source file from, and build it on one’s own.On OS X we have several ways to build OpenCV. The source firstly provide a traditional C/C++ interface because it is itself written in C/C++. The better way is to use the Python binding that comes with OpenCV source. Up to now, most of the python wrappers for OpenCV in PyPI seem dead.
Now brew install opencv3 will be ok and no more excessive changes needed.
Brew install opencv 3 python update#
Update : As Homebrew is upgraded to 1.0, opencv3 formula recevies 3.1.0_4 update too.