
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.
#BREW INSTALL OPENCV@2 USING PYTHON 3 INSTALL#
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. Python compiled from source with a designated -prefixĮach of them may have a corresponding pip util.Python 2.7.11 downloaded from in /Library/Frameworks/amework/.Python 2.7.10 shipped with OS X El Capitan in /System/Library/Frameworks/Python.On OSX we may have many python distributions. Homebrew helps a lot when I deal with the dependencies.

I choose the 2nd method because OpenCV relies on some other packages like eigen, libpng and so on.

#BREW INSTALL OPENCV@2 USING PYTHON 3 UPDATE#
Update : As Homebrew is upgraded to 1.0, opencv3 formula recevies 3.1.0_4 update too.
