Ask Your Question

face module missing from python cv2 version 3.3.0

asked 2017-09-20 19:01:04 -0500

I have cv2 version 3.3.0 installed, as verified by printing cv2.__ version __

It is my understanding that version 3.3.0 should have the face module by default, as per this official documentation:

I installed opencv-python via pip.

Any ideas what is going wrong and how I can fix it?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-09-20 21:06:36 -0500

berak gravatar image

the face module (like text,tracking and others) are in a seperate opencv_contrib repository, your installation does not have any of it.

you could retry with

(but installing via PIP has known downsides, like no gui or video file support)

maybe you want/need to install from src:

edit flag offensive delete link more


OpenCV in homebrew is built with contrib modules by default, according to this.

However, I just tried reinstalling opencv and got this message:

Python modules have been installed and Homebrew's site-packages is not
in your Python sys.path, so you will not be able to import the modules
this formula installed. If you plan to develop with these modules,
please run:
  mkdir -p /Users/cjoseph/.local/lib/python2.7/site-packages
  echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/cjoseph/.local/lib/python2.7/site-packages/homebrew.pth

I ran it and that solved my problem.

cjoseph gravatar imagecjoseph ( 2017-09-20 23:56:55 -0500 )edit

Question Tools

1 follower


Asked: 2017-09-20 19:01:04 -0500

Seen: 1,557 times

Last updated: Sep 20 '17