I am converting a script to use Gtk3 using the migration guide (Porting GTK2 to GTK3). I converted my import pygtk to a from gi.repository import Gtk a
import pygtk
from gi.repository import Gtk
This should work
from gi.repository import Gtk builder = Gtk.Builder() builder.add_from_file("project.xml")