Step 1: Install Homebrew, the OS X package manager
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew doctor
If brew doctor
reports any errors, be sure to resolve them before proceeding. Common errors include preexisting Python installations.
brew tap homebrew/science
brew install opencv
mkdir -p ~/Library/Python/2.7/lib/python/site-packages
echo '/usr/local/lib/python2.7/site-packages' > ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth
sudo easy_install pep8
Invoke the Python interpreter, and import the OpenCV and pep8 packages. If there are no errors, you're in business!
python
import cv2
import pep8
sudo apt-get install python-opencv python-pip
pip install pep8
Invoke the Python interpreter, and import the OpenCV package. If there are no errors, you're in business!
python
import cv2
import pep8
TODO. Pull request welcome!