简体   繁体   中英

update unmantained software using pygtk

I am trying to get an old piece of software back to work. it is a standalone database client, its graphical interface is described with python-glade and used/used the python module gtk .

when I last used it, it was two or three years ago, and at that time it could be installed just out of the box. I do not know with which versions of the different libraries it did work.

I initially wanted to isolate its dependencies in a virtual environment, but two of them are pygtk and gobject , which seem to be difficult to install using pip on linux and I am afraid I ended up with a rather dirty mess of similarly named globally installed libraries.

the original author of the software says he hasn't followed gtk developments too closeby recently and he hints at substituting the import gtk with from gi.repository import Gtk; gtk = Gtk from gi.repository import Gtk; gtk = Gtk , but if I do that, I get a segmentation fault in a library module:

/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: 
  Warning: g_type_get_qdata: assertion 'node != NULL' failed
  from gtk import _gtk
Segmentation fault (core dumped)

and anyway I would not know where to get the gdk , which is also used.

one serious problem is that I do not have a clear idea of what is the difference between the modules: pygtk , gtk , gi.repository.Gtk .

As jku said, GTK2 is still alive and kicking. You will be able to get the original application working if you install the proper dependencies. A quick look at the dependencies list gives me the impression that you should install the following packages (on a Debian-based system):

  • python2.7 (or any Python2.x)
  • python-sqlalchemy
  • python-gtk2
  • python-gobject-2
  • python-lxml
  • python-pysqlite2
  • python-glade2

if you encounter any

ImportError: No module named xxxx

You typically solve this by installing the corresponding python-xxxx package.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM