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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2026 CODEPRJ.COM