python中import cv2遇到的错误及安装方法

参考链接:https://blog.csdn.net/yuanlulu/article/details/79017116

从x86_64 + ubuntu18.04 + python3.5中import cv2(opencv4.1), 遇到以下错误:

ImportError: libSM.so.6: cannot open shared object file: No such file or directory

ImportError: libXrender.so.1: cannot open shared object file: No such file or directory

ImportError: libXext.so.6: cannot open shared object file: No such file or directory

ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory

解决方案:

apt-get update

apt-get install libsm6

apt-get install libxrender1

apt-get install libglib2.0-dev apt
-get install libxext-dev

 

你可能感兴趣的:(python中import cv2遇到的错误及安装方法)