Install OpenCV with homebrew on Mac OSX and Python 3

OpenCV appears to only be able to install on one version of python at once. There are a ton of outdated blog posts on how to do this – at the time of writing this one works.

brew reinstall opencv@3 --with-python3 --without-python

Then in python:

import cv2

Run the script:


Interested in Python? I send out weekly, personalized emails with articles and conference talks. Click here to see an example and subscribe.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *