正在为 python 安装视频序列包

Installing videosequence package for python

我从 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'

对于解决此问题的任何帮助,我们将不胜感激。

您似乎没有安装所需的 PyGObject introspection 库:

Caveats

Iterating forward one frame at a time is fast. Tricks such as iterating backwards or skipping n frames at a time work but is likely to be slow.

The implementation is based on GStreamer and so de facto only works on a modern Unix-alike such as Linux or FreeBSD.

The PyGObject introspection libraries must be installed. (See below.)

尝试从终端运行:

$ 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