简体   繁体   中英

Python 3 cannot find pygst module

I'm using Ubuntu 13.04 and have python 2.7 and 3.3.2 installed. I have recently started using python 3, but when I trying to import "pygst" gstreamer module, I get an error:

ImportError: No module named 'pygst'

In python 2.x everything works fine

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'

How can I get this module to import in python 3?

Thank you in advance!

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

from gi.repository import Gst

Libraries must be specifically written to work with both Python2 and Python3 as they are a bit different.

I was unable to find any reference to Python3 at gstreamer's home page, so my guess is they don't support it. You'll either have to port it yourself to Python3, or stick with Python2 (or live without it).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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