The error and installation method of import CV2 in Python

Don’t panic in case of data tilt, teach you to easily obtain the slope of table tilt>>>

Reference link: https://blog.csdn.net/yuanlulu/article/details/79017116

From x86_ Import CV2 (opencv4.1) in 64 + Ubuntu 18.04 + Python 3.5, encountered the following error:

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

Solution:

apt-get update

apt-get install libsm6

apt-get install libxrender1

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

Similar Posts: