Tkinter problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jim Anderson

    #1

    Tkinter problem


    I'm running Kubuntu a derivative of Debian Linux. I'm using
    Python 2.4 and tcl/tk 8.4. I'm running Tkinter programs and
    they were running about a month ago. When I tried them again
    yesterday, I got the following message:
    python ~/prog/python/iodef/iodef.py
    Traceback (most recent call last):
    File "/home/jja/prog/python/iodef/iodef.py", line 10, in ?
    import pkgview
    File "/home/jja/prog/python/iodef/lib/pkgview.py", line 3, in ?
    from Tkinter import *
    File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 38, in ?
    import _tkinter # If this fails your Python may not be configured
    for Tk
    ImportError: /usr/lib/python2.4/lib-dynload/_tkinter.so: cannot open
    shared object file: No such file or directory
    My environment varibles, like PTYHONPATH and TK_LIBRIARY all look
    correct and the tcl/tk and python librarys are all still in place.
    There is a file '/usr/lib/python2.4/lib-dynload/_tkinter.so'. I'm
    not sure if this is the file not being found, but that is what is
    sounds like.

    I did a search on this on the web and got some hits, but none of them
    provide a solution to my problem.

    Can anyone help with this problem?

    Jim Anderson
  • Simon Forman

    #2
    Re: Tkinter problem

    Jim Anderson wrote:
    I'm running Kubuntu a derivative of Debian Linux. I'm using
    Python 2.4 and tcl/tk 8.4. I'm running Tkinter programs and
    they were running about a month ago. When I tried them again
    yesterday, I got the following message:
    >
    python ~/prog/python/iodef/iodef.py
    Traceback (most recent call last):
    File "/home/jja/prog/python/iodef/iodef.py", line 10, in ?
    import pkgview
    File "/home/jja/prog/python/iodef/lib/pkgview.py", line 3, in ?
    from Tkinter import *
    File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 38, in ?
    import _tkinter # If this fails your Python may not be configured
    for Tk
    ImportError: /usr/lib/python2.4/lib-dynload/_tkinter.so: cannot open
    shared object file: No such file or directory
    >
    My environment varibles, like PTYHONPATH and TK_LIBRIARY all look
    correct and the tcl/tk and python librarys are all still in place.
    There is a file '/usr/lib/python2.4/lib-dynload/_tkinter.so'. I'm
    not sure if this is the file not being found, but that is what is
    sounds like.
    >
    I did a search on this on the web and got some hits, but none of them
    provide a solution to my problem.
    >
    Can anyone help with this problem?
    >
    Jim Anderson
    Just an idea, but if you're sure that
    /usr/lib/python2.4/lib-dynload/_tkinter.so exists, check it's
    permissions and the permissions of /usr/lib/python2.4/lib-dynload/

    HTH,
    ~Simon

    Comment

    • Nick Craig-Wood

      #3
      Re: Tkinter problem

      Simon Forman <rogue_pedro@ya hoo.comwrote:
      Just an idea, but if you're sure that
      /usr/lib/python2.4/lib-dynload/_tkinter.so exists, check it's
      permissions and the permissions of /usr/lib/python2.4/lib-dynload/
      Also run ldd on it - you could be missing a library

      eg

      $ ldd /usr/lib/python2.4/lib-dynload/_tkinter.so
      linux-gate.so.1 = (0xffffe000)
      libBLT.2.4.so.8 .4 =/usr/lib/libBLT.2.4.so.8 .4 (0xb7e80000)
      libtk8.4.so.0 =/usr/lib/libtk8.4.so.0 (0xb7dab000)
      libtcl8.4.so.0 =/usr/lib/libtcl8.4.so.0 (0xb7cfc000)
      libX11.so.6 =/usr/X11R6/lib/libX11.so.6 (0xb7c31000)
      libpthread.so.0 =/lib/tls/i686/cmov/libpthread.so.0 (0xb7c1e000)
      libc.so.6 =/lib/tls/i686/cmov/libc.so.6 (0xb7ae6000)
      libm.so.6 =/lib/tls/i686/cmov/libm.so.6 (0xb7ac0000)
      libnsl.so.1 =/lib/tls/i686/cmov/libnsl.so.1 (0xb7aa9000)
      libdl.so.2 =/lib/tls/i686/cmov/libdl.so.2 (0xb7aa5000)
      /lib/ld-linux.so.2 (0x80000000)

      If there are any missing things then you need to re-install those
      packages.

      --
      Nick Craig-Wood <nick@craig-wood.com-- http://www.craig-wood.com/nick

      Comment

      Working...