. Advertisement .
..3..
. Advertisement .
..4..
The error
/usr/local/lib/python2.7/dist-packages/cv2/__init__.py in <module>()
7
8 # make IDE's (PyCharm) autocompletion happy
----> 9 from .cv2 import *
10
11 # wildcard import above does not import "private" variables like __version__
ImportError: libSM.so.6: cannot open shared object file: No such file or directory
occurred when I import OpenCV, using import cv2. I’ve tried to fix it for some days but have not resolved it yet. Can someone suggest a relevant solution to fix the importerror: libsm.so.6: cannot open shared object file: no such file or directory issue? Much appreciate your support.
The cause: It’s possible that the issue is with your
python-opencv
version.The solution: You can fix this error by having it as the first two lines of the script:
Add sudo to your command line. To get it installed, I did the following:
Then, did this (optional! Maybe you won’t use it.
Finally, it was done!