linux离线安装opencv,linux下安装opencv

pip3 install opencv-python

引入模块出错

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

1、使用如下命令查看缺少得共享库

yum whatprovides libSM.so.6

yum whatprovides libXext.so.6

可以看到

libSM-1.2.2-2.el7.i686 : X.Org X11 SM runtime library

Repo : base

Matched from:

Provides : libSM.so.6

libXext-1.3.3-3.el7.i686 : X.Org X11 libXext runtime library

Repo : base

Matched from:

Provides : libXext.so.6

安装对应块即可

yum -y install libSM-1.2.2-2.el7.x86_64 --setopt=protected_multilib=false

yum -y install libXext-1.3.3-3.el7.x86_64 --setopt=protected_multilib=false

你可能感兴趣的:(linux离线安装opencv)