Reputation: 697
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
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