原因:缺少ffmpeg的支持
解决:一般opencv3.3版本及以上支持ffmpeg,实验4.1.0成功
pip install opencv-python
pip install opencv-contrib-python
如果出现以下问题,则是由于libsm包为安装
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.7/site-packages/cv2/__init__.py", line 9, in <module> from .cv2 import * ImportError: libSM.so.6: cannot open shared object file: No such file or directory