Question

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!

Était-ce utile?

La solution

If you have ubuntu 13.04, why don't you use gstreamer 1.0 through introspection, you can import with :

from gi.repository import Gst

Autres conseils

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).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top