解决docker中安装opencv-python出现的问题
'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline.ImportError: libGL.so.1: cannot open shared object file: No such file or directory
·
1. AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' (most likely due to a circular import)
用下面的命令可以把问题转成问题2,使用2的解决方案即可解决
pip3 install --user --upgrade opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
2. ImportError: libGL.so.1: cannot open shared object file: No such file or directory
pip install opencv-python-headless
apt-get update && apt-get install libgl1
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)