opencv ImportError解決方法

安裝完opencv-python後直接使用可能會遇到以下兩個錯誤,這是缺少運行文件,按照提示安裝即可,這裏稍微記錄一下。

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

解決方法:apt-get install libsm6

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

解決方法:apt-get install libxrender1

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

解決方法:apt-get install libxext-dev

注意你的系統可能以及安裝了某個版本的依賴導致安裝失敗,根據信息卸載重裝即可

我這邊使用的是python3

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章