JavaEar 专注于收集分享传播有价值的技术资料


I have installed opencv in ubuntu. Now, when I am importing cv2, there is an error

'ImportError: cannot open shared object file: No such file or directory'

How to fix the error ? I have already searched net and tried some but couldn't resolve the error.

I have also tried the following :

sudo apt-get install libjpeg9

The following is the output :

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libjpeg9



  1. For whatever reason your version of OpenCV has been oucompiled against ... Either you should also compile and instlal that or you can recompile opencv with libraries that are on your system.