我刚刚从Fedora 30升级到Fedora32。我所有的python东西都停止了工作。第一个问题是
import gtk
我读到我应该将其切换到
from gi.repository import Gtk as gtk
from gi.repository import Gdk
但是不存在许多模块。例如:
AttributeError: 'gi.repository.Gtk' object has no attribute 'combo_box_new_text'
AttributeError: 'gi.repository.Gtk' object has no attribute 'WINDOW_TOPLEVEL'
AttributeError: 'gi.repository.Gtk' object has no attribute 'settings_get_for_screen'
一团糟。
我该如何解决?
使用Gtk 3:
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk