gi.RepositoryError: Requiring namespace 'Gst' version '0.10', but '1.0' is already loaded

Kip Warner kip at
Tue Apr 2 22:39:27 PDT 2013

On Tue, 2013-04-02 at 15:51 -0700, Simon Feltman wrote:

> Some ideas... You might be able to ship the GstVideo-1.0 typelib along
> with relevant .so files with your app in a custom location. Then
> append these locations (depending on architecture) to GI_TYPELIB_PATH
> and LD_LIBRARY_PATH before importing anything in python. But I don't
> know how well this would work and it seems like it would require a lot
> of maintenance. I think a cleaner solution with be to just interface
> with apt (or PackageKit) to see if it is installed and ask the user if
> they want to install it if it isn't. 

Hey Simon. I think shipping the dependencies on the disc is, as you
said, probably a maintenance nightmare. On the other hand, asking the
user if they'd like to install the dependencies through apt / packagekit
would be great, except that it looks like gir1.2-gst-plugins-base-1.0
isn't included in the Ubuntu official repositories anyways, at least not
until Quantal. So the latter method wouldn't be very useful for most of
my users yet.

> A minimal Ubuntu specific example:
> try:
>     gi.require_version('GstVideo', '1.0')
> except ValueError:
>     # Inform user they don't have the GstVideo 1.0 and ask them to
> install it
> 'gir1.2-gst-plugins-base-1.0'])
> gi.require_version('GstVideo', '1.0')
> from gi.repository import GstVideo
> Hope this helps,
> -Simon

Yes, I think the latter runtime check is the best route. If the user has
the dependency available at runtime, then I can execute a certain code
path that uses some non-critical GStreamer optional eye candy. If they
don't have it, then I'll have some fall back code.

Thanks a lot.

Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the gstreamer-devel mailing list