解决docker中安装opencv-python出现的问题

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

你可能感兴趣的:(笔记,python函数,python,开发语言)