4

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!

2 Answers 2

2

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
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, but I can't import "gi" too, it gives me the same error: >>> import gi Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named 'gi' Package "python3-gi" installed, and gi files is in "/usr/lib/python3/dist-packages/" directory
if "which python" shows you a symbolic link to python2 then the problem is here :)
1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.