第一步,在docker容器内安装:
pip install opencv-python-headless -i https://pypi.tuna.tsinghua.edu.cn/simple
如果还没有解决,那么:
第二步,在宿主机的终端里安装:
sudo apt-get update
sudo apt-get install libgl1
如果还不行,继续回到容器内,执行 conda list,看到有这三个:
执行:
pip uninstall opencv-contrib-python opencv-python opencv-python-headless
然后,重新安装:
pip install opencv-python-headless -i https://pypi.tuna.tsinghua.edu.cn/simple
现在基本搞定了。