Python 2.7 install with GTK
I've been installing Python 2.7.1 onto my slackware 12/13 system, and I also wanted to re-install pygtk with other packages as well, to upgrade to the slackware 13.2 distro level. The python package looses track of all the site-packages installed for 2.6 when I did the upgrade; and although I could probably copy directories and such, I wanted to upgrade to the latest packages if possible...
But even when I finally got all the packages installed, including pygtk 2.24.0
I often got an: "ImportError: No module named gtk"
I looked for a gtk.py file, but there isn't one. There is a /usr/local/python2.7/site-packages/gtk2-0/gtk DIRECTORY, that is clearly meant to be the object. So, I did a "make uninstall" of pygtk and got the older version of pygtk to see what would happen.
These are the versions I have compiled and installed right now. You may need to uninstall the slackware equivalents as you do this....
gtk+2-2.18.9-i486-1.txz (Standard slackware 13.??)
python 2.7.1 (use './configure --enable-shared' to be safe on Slackware 13.0.')
(Remove the old python to be sure it isn't used by mistake...)
pycairo-1.8.6 (Not the absolute latest, but the latest of the non-bloated....)
gobject-introspection-0.10.8 (This could be disabled, but what the hey I added it....)
python 2.7.1 was the last of the python 2.x series, so that's what I wanted. The 3.x series is something I will tinker with later -- but it has too many changes for me to want to upgrade just yet.
In any event, the earlier package didn't give me the error; it only gives me depreciation warnings; and those warnings seem to cause the built in pygtk tests to fail -- but they don't appear to affect my normal programs that use pygtk; the warnings are issued at startup, and the programs run.
** Message: pygobject_register_sinkfunc is deprecated (GtkWindow)
** Message: pygobject_register_sinkfunc is deprecated (GtkInvisible)
** Message: pygobject_register_sinkfunc is deprecated (GtkObject)
I looked for the gtk.py file, and there still is none -- so I don't know what the difference is BUT I want to caution everyone about it. I don't know which is the last version that will install correctly with Slackware packages and GTK (yet), but I do know there are problems with pygtk2.24.0 and python2.7.1 on Slackware.