在进行人脸识别学习时,报了以下错误:
AttributeError: module 'cv2' has no attribute 'face'
百度后发现face这个函数并不是opencv库中自带的,需要下载
pip install opencv-contrib-python
然后又报了这个错误
AttributeError: module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline'
再次百度搜索搜到两种解决方法:
1.卸载opencv 和 contrib 重新安装,经实践无效。
2.只保留二者其一,我保留了后者,不再报错,代码正常运行。