已解决Yolo-world报错:AttributeError: partially initialized module ‘cv2‘ has no attribute ‘gapi_wip_gst
已解决Yolo-world报错:AttributeError: partially initialized module ‘cv2‘ has no attribute ‘gapi_wip_gst_GStreamerPipeline‘
·
在按照Yolo-world构建其指定的新环境时,安装了opencv-python==4.9.0.80, opencv-python-headless==4.2.0.34,运行代码出现下面的报错:
cv.gapi.wip.GStreamerPipeline = cv.gapi_wip_gst_GStreamerPipeline
AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' (most likely due to a circular import)
报错的提示其实是比较清晰的说的是存在循环导入的情况,但是实际是检查过了并没有存在循环导入的情况。
在重新卸载和安装这两个包之后也无法解决。
最后通过对本地安装的opencv模块进行升级,代码如下:
pip install --upgrade opencv-python
升级后顺利解决,记录一下!不匹配的情况可以考虑升级包版本!
更多推荐


所有评论(0)