Find the answer to your Linux question:
Results 1 to 3 of 3
Hi ! 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2009
    Location
    Oregon
    Posts
    51

    Python 2.7 install with GTK


    Hi !

    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....

    glib-2.28.6

    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....)
    pygobject-2.28.0
    pygtk-2.14.1

    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.

  2. #2
    Just Joined!
    Join Date
    May 2009
    Location
    Oregon
    Posts
    51
    OK, it works fine up to pygtk-2.22.0. (and substantially faster...)
    Hope this helps others. and don't forget to issue ldconfig after every make install....

  3. #3
    Just Joined!
    Join Date
    May 2009
    Location
    Oregon
    Posts
    51
    Additional update:
    The Gtk+-2 packages in slackware 13 conflict with those from slackware 12.

    In particular, the newer programs try to link against the older libraries and it causes segfaults in gimp and other packages when trying to load graphics images off of disk. Simply un-installing all gtk+-2 packages using pkgtool or removepkg is the best; then install the gtk packages from slackware 13.37;

    Check your /var/log/packages to find what gtk and gdk packages you have; make sure to get rid of all pixbuf containing packages before installing GTK from slackware 13.
    This was a very tricky bug to track down.

    Cheers!
    Andrew.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •