Newer version of opencv-contrib-python AttributeError

I’ve encountered an AttributeError: module ‘cv2’ has no attribute ‘face’ on the line


Installing an older version via pip (randomly chose version of opencv-contrib-python seems to do the trick, but I wonder why this is so, as it should be working in the newer versions too.

Thanks in advance!

can’t reproduce. I just fetched fresh opencv-contrib-python 4.5.5 for python 3.10 and I have cv2.face.

do you have opencv-python installed too? they conflict. pick one.

what version of python do you have?

Oops. facepalm
Thanks for the help!