import cv 2時ImportError:libjasper.so.1: cannot open shared object file: No such file or directory


問題の説明:
問題のように、cv 2のインポート時にImportError:libjasperが表示されます.so.1:cannot open shared object file:No such file or directoryこのエラー.
解決方法:
 

pip3 install opencv-contrib-python==3.3.0.9 -i https://www.piwheels.org/simple #   3309  

sudo apt-get update #     

sudo apt-get install libhdf5-dev

sudo apt-get install libatlas-base-dev

sudo apt-get install libjasper-dev

sudo apt-get install libqt4-test

sudo apt-get install libqtgui4

sudo apt-get update

 

python3

import cv2 #       

参照先:https://blog.csdn.net/qq_38269799/article/details/83384291