python - Glade 检测到错误版本的 Gtk+

标签 python python-3.x gtk3 glade

我有一个程序(由其他人编写)正在尝试运行。

Traceback (most recent call last):
  File "gui/gui.py", line 387, in <module>
    gui = GUI(filepath=filename)
  File "gui/gui.py", line 166, in __init__
    builder.add_from_file('gui/glade/gui.glade')
GLib.Error: gtk-builder-error-quark: gui/glade/gui.glade: required gtk+ version 3.22, current version is 3.14 (7)

我不太了解 Glade/GTK+,但它错误地检测了我的 libgtk 版本。

dpkg -l libgtk-3*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                          Version                     Architecture                Description
+++-=============================================-===========================-===========================-===============================================================================================
ii  libgtk-3-0:amd64                              3.22.30-1ubuntu1            amd64                       GTK+ graphical user interface library
ii  libgtk-3-bin                                  3.22.30-1ubuntu1            amd64                       programs for the GTK+ graphical user interface library
ii  libgtk-3-common                               3.22.30-1ubuntu1            all                         common files for the GTK+ graphical user interface library
ii  libgtk-3-dev:amd64                            3.22.30-1ubuntu1            amd64                       development files for the GTK+ library
ii  libgtk-3-doc                                  3.22.30-1ubuntu1            all                         documentation for the GTK+ graphical user interface library

没有看到 3.14 版本。

gui.glade 文件是here .

dpkg -l | grep gtk-3
ii  gir1.2-gtk-3.0:amd64                                             3.22.30-1ubuntu1                            amd64        GTK+ graphical user interface library -- gir bindings
ii  gtk-3-examples                                                   3.22.30-1ubuntu1                            amd64        example files for GTK+ 3
ii  libgtk-3-0:amd64                                                 3.22.30-1ubuntu1                            amd64        GTK+ graphical user interface library
ii  libgtk-3-bin                                                     3.22.30-1ubuntu1                            amd64        programs for the GTK+ graphical user interface library
ii  libgtk-3-common                                                  3.22.30-1ubuntu1                            all          common files for the GTK+ graphical user interface library
ii  libgtk-3-dev:amd64                                               3.22.30-1ubuntu1                            amd64        development files for the GTK+ library
ii  libgtk-3-doc                                                     3.22.30-1ubuntu1                            all          documentation for the GTK+ graphical user interface library

这是与 GTK 相关的所有内容。我尝试安装所有 GTK3 以解决此问题。

dpkg -l gtk*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                          Version                     Architecture                Description
+++-=============================================-===========================-===========================-===============================================================================================
ii  gtk-3-examples                                3.22.30-1ubuntu1            amd64                       example files for GTK+ 3
ii  gtk-chtheme                                   0.3.1-5ubuntu2              amd64                       GTK+ 2.0 theme changer and previewer utility
ii  gtk-clearlooks-gperfection2-theme             1.1-0ubuntu3                all                         gtk theme for the clearlooks engine
ii  gtk-doc-tools                                 1.27-3                      all                         GTK+ documentation tools
ii  gtk-gnutella                                  1.1.8-2                     amd64                       shares files in a peer to peer network
ii  gtk-gnutella-dbg                              1.1.8-2                     amd64                       shares files in a peer to peer network (debugging symbols)
ii  gtk-im-libthai:amd64                          0.2.1-8                     amd64                       GTK+ 2 Input Method Module using LibThai
ii  gtk-recordmydesktop                           0.3.8-4.1ubuntu1            all                         Graphical frontend for recordMyDesktop screencast tool
ii  gtk-redshift                                  1.11-1ubuntu1               all                         transitional dummy package
ii  gtk-sharp2-gapi                               2.12.40-2                   amd64                       C source parser and C# code generator for GObject based APIs
un  gtk-sharp2-unstable-gapi                      <none>                      <none>                      (no description available)
ii  gtk-sharp3                                    2.99.3-2                    amd64                       GTK# 3.0 suite, CLI bindings for GTK+
ii  gtk-sharp3-examples                           2.99.3-2                    all                         sample applications for the GTK# 3.0 toolkit
ii  gtk-sharp3-gapi                               2.99.3-2                    amd64                       C source parser and C# code generator for GObject based APIs
ii  gtk-theme-switch                              2.1.0-5build1               amd64                       GTK+ theme switching utility
ii  gtk-update-icon-cache                         3.22.30-1ubuntu1            amd64                       icon theme caching utility
ii  gtk-vector-screenshot                         0.3.2.1-2build1             amd64                       takes screenshots of applications as PDF or SVG files
ii  gtk2-engines:amd64                            1:2.20.2-5                  amd64                       theme engines for GTK+ 2.x
ii  gtk2-engines-aurora                           1.5.1-4                     amd64                       Aurora gtk+-2.0 theme engine
ii  gtk2-engines-blueheart                        0.20070123-0ubuntu2         all                         Blueheart GTK+ 2.x Theme
ii  gtk2-engines-cleanice                         2.4.1-3                     amd64                       CleanIce themes for GTK+ 2.x
ii  gtk2-engines-equinox                          1.50-0ubuntu4               amd64                       Equinox GTK+ theme engine
un  gtk2-engines-gartoon                          <none>                      <none>                      (no description available)
ii  gtk2-engines-moblin                           1.1.1-1.1                   amd64                       gtk2 engines for moblin
ii  gtk2-engines-murrine:amd64                    0.98.2-2ubuntu1             amd64                       cairo-based gtk+-2.0 theme engine
ii  gtk2-engines-nodoka                           0.7.2-0ubuntu3              amd64                       Nodoka theme engine for GTK+ 2.x
ii  gtk2-engines-oxygen:amd64                     1.4.6-1ubuntu1              amd64                       Oxygen widget theme for GTK+-based applications
ii  gtk2-engines-pixbuf:amd64                     2.24.32-1ubuntu1            amd64                       pixbuf-based theme for GTK+ 2.x
ii  gtk2-engines-qtcurve:amd64                    1.8.18+git20160320-3d8622c- amd64                       QtCurve widget style for applications based on GTK+ 2.x
ii  gtk2-engines-sugar:amd64                      0.112-1                     amd64                       Sugar Learning Platform - GTK+ 2.x theme engine
ii  gtk2-engines-wonderland                       1.0-11                      amd64                       Wonderland theme for GTK+-2.0
ii  gtk2-engines-xfce                             3.2.0-3                     amd64                       GTK+-2.0 theme engine for Xfce
ii  gtk2-ex-formfactory-perl                      0.67-0ubuntu1               all                         Makes building complex GUI's easy (dummy package)
un  gtk2.0-binver-2.10.0                          <none>                      <none>                      (no description available)
ii  gtk2.0-examples                               2.24.32-1ubuntu1            amd64                       example files for GTK+ 2.0
ii  gtk2hs-buildtools                             0.13.3.1-1                  amd64                       Tools to build the Gtk2Hs suite of User Interface libraries
un  gtk3-binver-3.0.0                             <none>                      <none>                      (no description available)
ii  gtk3-engines-breeze                           5.12.4-0ubuntu1             all                         Transitional package for KDE's Breeze
ii  gtk3-engines-unico:amd64                      1.0.3+14.04.20140109-0ubunt amd64                       Unico Gtk+ 3 theme engine
ii  gtk3-engines-xfce                             3.2.0-3                     amd64                       GTK+-3.0 theme engine for Xfce
ii  gtk3-im-libthai:amd64                         0.2.1-8                     amd64                       GTK+ 3 Input Method Module using LibThai
ii  gtk3-nocsd                                    3-1ubuntu1                  all                         Disable Gtk+ 3 client side decorations (CSD)
ii  gtkam                                         1.0-3                       amd64                       application for retrieving media from digital cameras
ii  gtkam-gimp                                    1.0-3                       amd64                       gtkam gimp plugin to open digital camera pictures
ii  gtkatlantic                                   0.6.2-2                     amd64                       Game like Monopoly
ii  gtkballs                                      3.1.5-11                    amd64                       simple logic game
ii  gtkboard                                      0.11pre0+cvs.2003.11.02-7bu amd64                       many board games in one program
ii  gtkcookie                                     0.4-7                       amd64                       editor for cookie files
un  gtkgl-dev                                     <none>                      <none>                      (no description available)
ii  gtkguitune                                    0.8-6ubuntu3                amd64                       Guitar and other instruments tuner
ii  gtkhash                                       1.1.1-2                     amd64                       GTK+ utility for computing checksums and more
un  gtkhash-common                                <none>                      <none>                      (no description available)
un  gtklick                                       <none>                      <none>                      (no description available)
ii  gtklp                                         1.3.1-0.1build1             amd64                       printing tool for CUPS on the GNOME Desktop
ii  gtkmm-documentation                           3.22.0-2                    all                         Documentation of C++ wrappers for GLib/GTK+
ii  gtkmorph                                      1:20140707+nmu2build1       amd64                       Digital image warp and morph (gtk)
ii  gtkmorph-example                              1:20140707+nmu2build1       all                         digital image warp and morph, examples
ii  gtkperf                                       0.40+ds-2build1             amd64                       GTK+ performance benchmark
ii  gtkpod                                        2.1.5-6                     amd64                       manage songs and playlists on an Apple iPod
ii  gtkpod-data                                   2.1.5-6                     all                         architecture-independent files for gtkpod
ii  gtkpod-dbg                                    2.1.5-6                     amd64                       debugging symbols for gtkpod
ii  gtkpool                                       0.5.0-9build1               amd64                       simple pool billiard game written with GTK+
ii  gtkterm                                       0.99.7+git9d63182-1         amd64                       simple GTK+ serial port terminal
ii  gtkwave                                       3.3.86-1                    amd64                       VCD (Value Change Dump) file waveform viewer

问候,路易斯。

最佳答案

问题与 Anaconda 包 gtk3 有关。

关于python - Glade 检测到错误版本的 Gtk+,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52783133/

相关文章:

python - SQLAlchemy 在合并上设置索引

python - 导入错误: cannot import name 'SubgradientStructuredSVM'

python - 使用 PyGithub 获取 Github 中的用户信息

python-3.x - 无法在 Python 3.8 上运行 Supervisor

c - 在 Gtk+ 中如何称呼这些 "widgets"?

python - 格式化 datetime.utcnow() 时间

Python 列出函数参数名称

python - Python 中的对数不准确

c++ - 有没有办法忽略信号签名?

python - python GTK3中TextView空闲时运行方法