# Newer version of opencv-contrib-python AttributeError

**URL:** <https://forum.opencv.org/t/newer-version-of-opencv-contrib-python-attributeerror/6905>\
**Category:** Python\
**Created:** [December 29, 2021, 10:48pm UTC](https://forum.opencv.org/t/newer-version-of-opencv-contrib-python-attributeerror/6905 "2021-12-29T22:48:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Easternspork](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/easternspork/32/4105_2.png) [@Easternspork](https://forum.opencv.org/u/Easternspork)\
**Post date:** [December 29, 2021, 10:48pm UTC](https://forum.opencv.org/t/newer-version-of-opencv-contrib-python-attributeerror/6905/1 "2021-12-29T22:48:45Z")

</div>

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

```auto
cv2.face.LBPHFaceRecognizer_create()

```

Installing an older version via pip (randomly chose version 3.4.15.55) 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!

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [December 30, 2021, 2:06am UTC](https://forum.opencv.org/t/newer-version-of-opencv-contrib-python-attributeerror/6905/2 "2021-12-30T02:06:57Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Easternspork](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/easternspork/32/4105_2.png) [@Easternspork](https://forum.opencv.org/u/Easternspork)\
**Post date:** [December 30, 2021, 2:14am UTC](https://forum.opencv.org/t/newer-version-of-opencv-contrib-python-attributeerror/6905/3 "2021-12-30T02:14:51Z")

</div>

> [@crackwitz](#):
>
> do you have `opencv-python` installed too? they conflict. pick one.

Oops. _facepalm_  
Thanks for the help!
