# OpenCV-Python on STM32MP1 with linux: AttributeError: module ‘cv2’ has no attribute ‘FaceDetectorYN\_create’

**URL:** <https://forum.opencv.org/t/opencv-python-on-stm32mp1-with-linux-attributeerror-module-cv2-has-no-attribute-facedetectoryn-create/11439>\
**Category:** Python\
**Tags:** arm\
**Created:** [December 28, 2022, 7:11am UTC](https://forum.opencv.org/t/opencv-python-on-stm32mp1-with-linux-attributeerror-module-cv2-has-no-attribute-facedetectoryn-create/11439 "2022-12-28T07:11:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kimhyunseok](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/kimhyunseok/32/6844_2.png) [@kimhyunseok](https://forum.opencv.org/u/kimhyunseok)\
**Post date:** [December 28, 2022, 7:11am UTC](https://forum.opencv.org/t/opencv-python-on-stm32mp1-with-linux-attributeerror-module-cv2-has-no-attribute-facedetectoryn-create/11439/1 "2022-12-28T07:11:08Z")

</div>

Hello,

I have been using python3.7 and opencv4.6 on my desktop(windows and linux).  
Recently, I got a stm32mp1 device and tried to install python3.7 and opencv4.6 here, but opencv4.6 was not installed. The reason is that even though stm32mp1 supports Linux, it is thought that it did not bring all the functions of destop.

I received the latest binary for stm32mp1 in the ST forum, where it is explained that it support up to opencv4.5.

The problem is that when I built the software I developed on stm32mp1, the following error comes out, and according to opencv4.5 document in opencv site, it supports the following attributes. However, the following errors are being made.  
“AttributeError: module ‘cv2’ has no attribute ‘FaceDetectorYN\_create’”

I would like to ask you how to fix and operate these things normally.

Thank you.  
Dr. Kim Hyunseok.

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [December 28, 2022, 9:24am UTC](https://forum.opencv.org/t/opencv-python-on-stm32mp1-with-linux-attributeerror-module-cv2-has-no-attribute-facedetectoryn-create/11439/2 "2022-12-28T09:24:49Z")

</div>

> [@kimhyunseok](#):
>
> according to opencv4.5 document in opencv site, it supports the following attributes. However, the following errors are being made.  
> “AttributeError: module ‘cv2’ has no attribute ‘FaceDetectorYN\_create’”

[4.5.5 does not have this class](https://docs.opencv.org/4.5.5/d5/d54/group__objdetect.html)

> [@kimhyunseok](#):
>
> tried to install python3.7 and opencv4.6 here, but opencv4.6 was not installed.

please tell us, what were the problems there

---

<div class="post-metadata">

**Author:** ![kimhyunseok](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/kimhyunseok/32/6844_2.png) [@kimhyunseok](https://forum.opencv.org/u/kimhyunseok)\
**Post date:** [December 30, 2022, 12:59am UTC](https://forum.opencv.org/t/opencv-python-on-stm32mp1-with-linux-attributeerror-module-cv2-has-no-attribute-facedetectoryn-create/11439/3 "2022-12-30T00:59:16Z")

</div>

Thank you for your answers.  
The below is my error messages.

root@stm32mp1:/usr/local/demo# apt-get install opencv=4.6  
Reading package lists… Done  
Building dependency tree… Done  
Reading state information… Done  
Package opencv is not available, but is referred to by another package.  
This may mean that the package is missing, has been obsoleted, or  
is only available from another source

E: Version ‘4.6’ for ‘opencv’ was not found

Thank you .  
Dr. Kim Hyunseok

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [December 30, 2022, 5:51am UTC](https://forum.opencv.org/t/opencv-python-on-stm32mp1-with-linux-attributeerror-module-cv2-has-no-attribute-facedetectoryn-create/11439/4 "2022-12-30T05:51:07Z")

</div>

and :

```
pip install opencv-python

```

??

---

<div class="post-metadata">

**Author:** ![kimhyunseok](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/kimhyunseok/32/6844_2.png) [@kimhyunseok](https://forum.opencv.org/u/kimhyunseok)\
**Post date:** [December 30, 2022, 7:05am UTC](https://forum.opencv.org/t/opencv-python-on-stm32mp1-with-linux-attributeerror-module-cv2-has-no-attribute-facedetectoryn-create/11439/5 "2022-12-30T07:05:58Z")

</div>

The stm32mp1 is not supported pip, also it couldn’t installed with python.

Thank you.
