Cannot import cv2 in python in OSX

I do not know what pip install cv2 actually installs… but is surely not OpenCV. pip install cv2 actually installs this, which are some blog distribution utilities, not sure what it is, but it is not OpenCV.

To properly install OpenCV, check any of the links @udit043 added in the comment, or refer to any of the tutorials bellow:

Find here a tutorial on how to install OpenCV on OS X:

You need to actually compile OpenCV from source and activate python bindings, which takes a while.

Another option is to use brew to get OpenCV, but doesn’t neccesarilly get you the last version nor a fully optimized one:

Leave a Comment