使用Docker非常方便,但是如果有用到OpenCV,就得注意,幾個踩雷的地方,先筆記一下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
''' 不要安裝opencv,要安裝opencv-python-headless ''' opencv-python-headless ''' 出現錯誤 ImportError: libGL.so.1:cannot open shared object file: No such file or dir ''' sudo apt-get install libgl1-mesa-glx or apt-get install ffmpeg libsm6 libxext6 apt-get install libgl1 #####CentOS/RHEL yum install mesa-libGL -y |