gpt4 book ai didi

Python 3 找不到 pygst 模块

转载 作者:太空宇宙 更新时间:2023-11-03 11:06:05 25 4
gpt4 key购买 nike

我正在使用 Ubuntu 13.04 并安装了 python 2.7 和 3.3.2。我最近开始使用 python 3,但是当我尝试导入“pygst”gstreamer 模块时,出现错误:

ImportError: No module named 'pygst'

在 python 2.x 中一切正常

Python 2.7.4 (default, Apr 19 2013, 18:32:33) 
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygst
>>> exit()

Python 3.3.2 (default, Oct 6 2013, 01:42:16)
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygst
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'pygst'

如何让这个模块在 python 3 中导入?

提前致谢!

最佳答案

如果你有 ubuntu 13.04,为什么不通过内省(introspection)使用 gstreamer 1.0,你可以导入:

from gi.repository import Gst

关于Python 3 找不到 pygst 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19214528/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com