在进行人脸识别学习时,报了以下错误:
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.只保留二者其一,我保留了后者,不再报错,代码正常运行。
本文讲述了在人脸识别学习过程中遇到的cv2模块'face'属性缺失问题,以及如何通过查找解决方案,如安装opencv-contrib-python和调整库版本来修复'gapi_wip_gst_GStreamerPipeline'错误。最终,作者分享了卸载重装无效后的正确处理方法,确保代码正常运行。
2171

被折叠的 条评论
为什么被折叠?



