import cv2 报错ImportError: libGL.so.1: cannot open shared object file: No such file or directory 解决办法

第一步,在在环境里安装:

pip install opencv-python-headless -i https://pypi.tuna.tsinghua.edu.cn/simple

如果还没有解决,那么:

第二步,安装:

sudo apt-get update
sudo apt-get install libgl1

注,这两句不是在docker容器里输入,而是在宿主机的终端里输入。

现在基本搞定了。

你可能感兴趣的:(机器学习/深度学习,python,opencv,人工智能,linux,ubuntu)