pip install pygobject

This just happened.

What that means is you can now install pygobject as you would any other module, with pip, in the comfort of your virtual environment:

$ pip install git+https://git.gnome.org/browse/pygobject

Or, once it's been released (around mid-september):

$ pip install https://download.gnome.org/sources/pygobject/3.22/pygobject-3.22.0.tar.xz

Of course, you can also add one of the above URLs to the requirements.txt file for your project, for example:


And then you gain access to the excellent GNOME development stack, like Gtk+ for graphical applications, GDBus to talk to services over DBus, and much more!

For example, here's a trivial script using Gtk to create an application window and display it:

import gi
gi.require_version('Gtk', '3.0')

from gi.repository import Gio
from gi.repository import Gtk

class Application(Gtk.Application):
    def __init__(self):
        super(Application, self).__init__(

    def do_activate(self):
        if not hasattr(self, '_window'):
            self._window = Gtk.ApplicationWindow(application=self)


app = Application()

Save it in a file somewhere, run it inside your virtual environment, and observe the beauty of this empty window.

Hopefully this will make the GNOME development stack more attractive to Python developers, since it is now accessible using only the tools we already know and love (no need to learn about the Autotools and Jhbuild any more), and isolating each development stack from the system in virtual environments as we normally do.