当前位置:网站首页>AttributeError: module ‘cv2‘ has no attribute ‘gapi_wip_gst_GStreamerPipeline‘

AttributeError: module ‘cv2‘ has no attribute ‘gapi_wip_gst_GStreamerPipeline‘

2022-06-21 16:04:00 精英干员瑕光

在进行人脸识别学习时,报了以下错误:

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.只保留二者其一,我保留了后者,不再报错,代码正常运行。

原网站

版权声明
本文为[精英干员瑕光]所创,转载请带上原文链接,感谢
https://blog.csdn.net/Zhong____/article/details/125339240