Troubles with old Python 2 app on Rocky Linux 8


There’s an old (and unmaintained) Python 2 app named Gtkcdlabel that I’m currently trying to install on my brand new Rocky Linux 8 workstation. It’s a graphical frontend to the cdlabelgen command line utility.

The command line dependency is not provided by any repository. So I downloaded the Fedora 28 SRPMS and managed to build a package using mock.

As for Gtkcdlabel, I downloaded the package from Sourceforge. Took a peek at the package content, then installed it by spamming my system:

# tar -xvjf gtkcdlabel-1.15.tar.bz2 -C /

The main application is /usr/bin/ which is essentially a Python script. I had to change the header to point to /usr/bin/python2.7 and now I get a couple of warnings and the following error:

ERROR: you need to install pygtk or gtk2

But pygtk2 is already installed on my system, so I’m puzzled.

Any folks with some basic Python knowledge here ?

I don’t know Python, but I doubt that Python would say “you need to install”.

In fact, the does write that in:

        import gtk
        print "ERROR:   you need to install pygtk or gtk2"

That pygtk2 package does require python2, so it is for Python 2.7 (rather than some Python 3). Alas, that isn’t the issue.

Based on below, the “glade” submodule does not exist in the EL8 version:

  1. EL7 had package pygtk2-libglade. EL8 does not.
  2. Section “Removed packages” lists “glade” in
  3. import clearly fails:
[EL8]$ python2
Python 2.7.18 (default, Apr 21 2022, 11:24:56) 
[GCC 8.5.0 20210514 (Red Hat 8.5.0-10)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named glade
1 Like

Thanks for your detailed answer. I searched around some more and stumbled over this webpage that acts as an alternative graphical frontend to cdlabelgen. It’s quite old, but I gave it a spin, and it works perfectly.



1 Like