繁体   English   中英

Python 3找不到pygst模块

[英]Python 3 cannot find pygst module

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

ImportError:没有名为'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,为什么不通过内省使用gstreamer 1.0,您可以导入:

from gi.repository import Gst

必须专门编写库才能使用Python2和Python3,因为它们有点不同。

我无法在gstreamer的主页上找到任何对Python3的引用,所以我的猜测是他们不支持它。 你要么自己将它移植到Python3,要么坚持使用Python2(或没有它)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM