Under the Mac installation Opencv-python and Windows, the feeling is similar, here the main record of the Mac under the Opencv-python installation process.
_________________________________________________________________________________
1. If there is no homebrew, it is necessary to install first (homebrew similar to Linux Apt-get, for package management, strongly recommended. )
Address: http://brew.sh/
2. After the homebrew, we'll talk.
Brew tap homebrew/science
Brew Install OpenCV
Note: Because we often use brew's main package, we need to download the brew's sub package, such as Homebrew/science, and then install OPENCV when it comes to some less common packages. You can view additional child packages on the https://github.com/Homebrew.
3. Into the site-packages directory of Python
cd/library/python/2.7/site-packages/
4. Make soft link (download good OpenCV put in/usr/local/cellar/opencv/2.4.12_2/)
Ln-s/usr/local/cellar/opencv/2.4.12_2/lib/python2.7/site-packages/cv.py cv.py
ln-s/usr/local/Cellar/opencv/ 2.4.12_2/lib/python2.7/site-packages/cv2.so cv2.so
5. Configure environment variables (if not previously configured)
Export pythonpath= $PYTHONPATH:/usr/local/lib/python2.7/site-packages
_________________________________________________________________________________
Get. Now you can go to the console and go into the Python interactive mode >>>import cv2 >>> should not complain.