我从Pypi
下载了视频序列包之后,我从下载的文件夹中运行了python setup.py install
,然后我运行了只包含一行from videosequence import VideoSequence
的简单脚本,并收到了错误
Traceback (most recent call last):
File "videoseq.py", line 2, in <module>
from videosequence import VideoSequence
File "build/bdist.macosx-10.6-x86_64/egg/videosequence/__init__.py", line 12, in <module>
AttributeError: 'module' object has no attribute 'require_version'
感谢您解决此问题的任何帮助。
答案 0 :(得分:0)
您似乎没有安装所需的PyGObject introspection
库:
注意事项
一次向前迭代一帧很快。诸如向后迭代或一次跳过n帧的技巧有效但很可能 慢。
该实现基于GStreamer,因此事实上只适用于现代的Unix,如Linux或FreeBSD。
必须安装PyGObject内省库。 (见下文。)
尝试从终端运行:
$ sudo apt install gir1.2-gstreamer-1.0 gir1.2-gst-plugins-base-1.0 \
python-gi python3-gi
此外,如果未安装,则需要GStreamer模块:
$ sudo apt install libgstreamer1.0-dev gstreamer1.0-plugins-good