centos7 +  python3.6.4  

我使用

pip3 install opencv-python

安装了opencv-python  之后,在使用 import cv2  报错如下

【Linux】 解决报错: ImportError: libSM.so.6: cannot open shared object file: No such file or directory

 

报错原因: 缺少共享库

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

yum whatprovides libSM.so.6

 

【Linux】 解决报错: ImportError: libSM.so.6: cannot open shared object file: No such file or directory

 

使用以下命令解决:

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

 

校验一下: 输入以下命令来查看 opencv得版本

python
import cv2
cv2.__version__

 

【Linux】 解决报错: ImportError: libSM.so.6: cannot open shared object file: No such file or directory

 

 至此,已成功! 

 

相关文章:

  • 2021-06-03
  • 2021-07-10
  • 2022-12-23
  • 2021-06-01
  • 2021-04-03
  • 2021-11-06
  • 2021-11-27
猜你喜欢
  • 2021-05-25
  • 2021-06-27
  • 2021-06-12
  • 2021-12-26
  • 2022-01-23
相关资源
相似解决方案