AttributeError: module ‘cv2‘ has no attribute ‘face‘解决方案

报错:

face_recognizer = cv.face.LBPHFaceRecognizer_create()

AttributeError: module 'cv2' has no attribute 'face'

解决方法:

方法1.尝试终端安装:pip install opencv-contrib-python

方法2.全部卸载重装:终端依次执行

pip uninstall opencv-contrib-python

pip uninstall opencv-python

pip install opencv-python

pip install opencv-contrib-python

方法3.看看别的csdn解决方案!!!

你可能感兴趣的:(python,vscode,opencv)