Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/354.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3找不到pygst模块_Python_Python 2.7_Python 3.x_Gstreamer_Pygst - Fatal编程技术网

Python 3找不到pygst模块

Python 3找不到pygst模块,python,python-2.7,python-3.x,gstreamer,pygst,Python,Python 2.7,Python 3.x,Gstreamer,Pygst,我使用的是Ubuntu13.04,安装了Python2.7和3.3.2。我最近开始使用python 3,但当我尝试导入“pygst”gstreamer模块时,出现了一个错误: ImportError:没有名为“pygst”的模块 在Python2.x中,一切正常 Python 2.7.4 (default, Apr 19 2013, 18:32:33) [GCC 4.7.3] on linux2 Type "help", "copyright", "credits" or "license"

我使用的是Ubuntu13.04,安装了Python2.7和3.3.2。我最近开始使用python 3,但当我尝试导入“pygst”gstreamer模块时,出现了一个错误:

ImportError:没有名为“pygst”的模块

在Python2.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 2.7.4(默认,2013年4月19日,18:32:33)
[GCC 4.7.3]关于linux2
有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。
>>>进口pygst
>>>退出()
Python 3.3.2(默认值,2013年10月6日,01:42:16)
[GCC 4.7.3]在linux上
有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。
>>>进口pygst
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
ImportError:没有名为“pygst”的模块
如何在Python3中导入此模块


提前谢谢你

由于Python2和Python3有点不同,因此必须专门编写库来使用它们


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

如果你有Ubuntu13.04,为什么不通过内省使用gstreamer 1.0,你可以导入:

from gi.repository import Gst
谢谢,但是我也不能导入“gi”,它会给我同样的错误:
>>导入gi回溯(最近一次调用):文件“”,第1行,在ImportError中:没有安装名为“gi”的模块。
包“python3 gi”,并且gi文件位于“/usr/lib/python3/dist packages/“directoryif”哪个python中向您显示到python2的符号链接,然后问题就在这里:)