Skip to content

Instantly share code, notes, and snippets.

@kevinkirkup
Last active September 9, 2018 02:41
Show Gist options
  • Save kevinkirkup/e061a244e8133ff450b7965bdea8cecb to your computer and use it in GitHub Desktop.
Save kevinkirkup/e061a244e8133ff450b7965bdea8cecb to your computer and use it in GitHub Desktop.
Install OpenCV with Homebrew on macOS Sierra
#!/usr/bin/sh
# https://github.com/Homebrew/homebrew-science/issues/4104
brew reinstall opencv3 --HEAD --with-ffmpeg --with-tbb --with-contrib
# Since this is keg only, create a pth file to include the python bindings in the python path
echo /usr/local/opt/opencv3/lib/python2.7/site-packages >> /usr/local/lib/python2.7/site-packages/opencv3.pth
mkdir -p /Users/<user>/Library/Python/2.7/lib/python/site-packages
echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/<user>/Library/Python/2.7/lib/python/site-packages/homebrew.pth
@BlackburnParias
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment