Skip to content

Instantly share code, notes, and snippets.

@2016rshah
Last active February 9, 2016 19:01
Show Gist options
  • Save 2016rshah/9863407418ecbd3ca03a to your computer and use it in GitHub Desktop.
Save 2016rshah/9863407418ecbd3ca03a to your computer and use it in GitHub Desktop.
Instructions on installing OpenCV for AI2 on a mac

(Requirement: homebrew should already be installed) This will install opencv3 on a mac for use with python2

$ brew tap homebrew/science

$ brew install opencv3 --with-python3

$ mkdir -p /Users/rushi/Library/Python/2.7/lib/python/site-packages

$ echo 'import sys; sys.path.insert(1, "/usr/local/lib/python2.7/site-packages")' >> /Users/rushi/Library/Python/2.7/lib/python/site-packages/homebrew.pth

$ echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/rushi/Library/Python/2.7/lib/python/site-packages/homebrew.pth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment