今天在docker镜像环境下操作时,明明已经安装了opencv,但是在import时还是出错了,具体记录如下:
python3.6环境下, pip install opencv-python后,import cv2报以下错误:
from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
解决方法:
apt-get install -y libgl1-mesa-dev