felixinho
felixinho

Reputation: 697

How to install PyGObject in Anaconda on linux?

When importing PyGObject in my Anaconda Python3.7 installation,

import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk

I get following error message:

ValueError: Namespace Gtk not available

I installed pygobject and gobject-introspection from the conda-forge channel.

When I use the system installation of Python it works just fine.

Upvotes: 5

Views: 2547

Answers (1)

Adrian Ałaszewski
Adrian Ałaszewski

Reputation: 41

You're probably missing gtk3. This is what you have to do to make your snippet work:

  • install PyGObject: conda install -c conda-forge pygobject

  • install Gtk3: conda install -c conda-forge gtk3

Upvotes: 4

Related Questions