5

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.

felixinho
  • 625
  • 7
  • 17

1 Answers1

2

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