在进行人脸识别学习时,报了以下错误:
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.只保留二者其一,我保留了后者,不再报错,代码正常运行。
————————————————
版权声明:本文为优快云博主「精英干员瑕光」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.youkuaiyun.com/Zhong____/article/details/125339240