緣由:缺乏ffmpeg的支持python
解決:通常opencv3.3版本及以上支持ffmpeg,實驗4.1.0成功python2.7
pip install opencv-python pip install opencv-contrib-python
若是出現如下問題,則是因爲libsm包爲安裝spa
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