3

When following the instructions 2. Getting Started — Python GTK+ 3 Tutorial 3.4 documentation

Tries

In [6]: import gi
   ...: gi.require_version('Gtk', '3.0')
   ...: from gi.repository import Gtk

it report errors:

~/anaconda3/lib/python3.7/site-packages/gi/__init__.py in require_version(namespace, version)
    128     available_versions = repository.enumerate_versions(namespace)
    129     if not available_versions:
--> 130         raise ValueError('Namespace %s not available' % namespace)
    131
    132     if version not in available_versions:

ValueError: Namespace Gtk not available

Follow How do I Install GTK+ 3.0? - Ask Ubuntu and intstalled Gtk to ubuntu

sudo apt-get install libgtk-3-dev

However, it still report the same errors.

How could solve the problem?

Wizard
  • 2,951

1 Answers1

0

I had the same issue but solved it by just making a python virtual environment and then running the command you listed.