Tkinter problem

Discussion in 'Python' started by dale cooper, Oct 31, 2005.

  1. dale cooper

    dale cooper Guest

    Hi everybody!
    I've recently installed python2.4.2 on Fedora 4 (from downloaded
    sources), but it appeared, that I can't use Tkinter module:

    >>> import Tkinter

    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "/usr/local/lib/python2.4/lib-tk/Tkinter.py", line 38, in ?
    import _tkinter # If this fails your Python may not be configured
    for Tk
    ImportError: libBLT24.so: cannot open shared object file: No such file
    or directory

    I tried the solution given in README file for RH9 (./configure
    --enable-unicode=ucs4) despite they wrote the newer wersion didn't need
    this hack. This is what I had after make instruction:

    INFO: Can't locate Tcl/Tk libs and/or headers
    *** WARNING: renaming "array" since importing it failed:
    build/lib.linux-i686-2.4/array.so: undefined symbol:
    PyUnicodeUCS2_FromUnicode
    *** WARNING: renaming "_testcapi" since importing it failed:
    build/lib.linux-i686-2.4/_testcapi.so: undefined symbol:
    PyUnicodeUCS2_Decode
    *** WARNING: renaming "unicodedata" since importing it failed:
    build/lib.linux-i686-2.4/unicodedata.so: undefined symbol:
    PyUnicodeUCS2_FromUnicode
    *** WARNING: renaming "_locale" since importing it failed:
    build/lib.linux-i686-2.4/_locale.so: undefined symbol:
    PyUnicodeUCS2_AsWideChar
    *** WARNING: renaming "cPickle" since importing it failed:
    build/lib.linux-i686-2.4/cPickle.so: undefined symbol:
    PyUnicodeUCS2_AsUTF8String
    *** WARNING: renaming "pyexpat" since importing it failed:
    build/lib.linux-i686-2.4/pyexpat.so: undefined symbol:
    PyUnicodeUCS2_DecodeUTF8
    *** WARNING: renaming "_multibytecodec" since importing it failed:
    build/lib.linux-i686-2.4/_multibytecodec.so: undefined symbol:
    PyUnicodeUCS2_FromUnicode
    running build_scripts

    It seems that --enable-unicode=ucs4 wasn't the right way. I tried
    another hack: ./configure --enable-shared, but it still couldn't locate
    Tcl/Tk libs and/or headers. Then I installed RPMs:

    [root@localhost Python-2.4.2]# rpm -q tk
    tk-8.4.9-3
    [root@localhost Python-2.4.2]# rpm -q tcl
    tcl-8.4.9-3
    [root@localhost Python-2.4.2]# rpm -q tkinter
    tkinter-2.4.1-2

    and tried to do the hacks above, but it still could'nt find these libs.
    What can I do?
     
    dale cooper, Oct 31, 2005
    #1
    1. Advertising

  2. "dale cooper" wrote:

    > I've recently installed python2.4.2 on Fedora 4 (from downloaded
    > sources), but it appeared, that I can't use Tkinter module:
    >
    >>>> import Tkinter

    > Traceback (most recent call last):
    > File "<stdin>", line 1, in ?
    > File "/usr/local/lib/python2.4/lib-tk/Tkinter.py", line 38, in ?
    > import _tkinter # If this fails your Python may not be configured
    > for Tk
    > ImportError: libBLT24.so: cannot open shared object file: No such file
    > or directory


    this seems to indicate that the build process picked up the Tk BLT extension [1],
    but that you haven't installed that extension properly.

    </F>

    1) http://sourceforge.net/projects/blt/
     
    Fredrik Lundh, Oct 31, 2005
    #2
    1. Advertising

  3. dale cooper

    dale cooper Guest

    Thanks, but I've got another question:

    can't find Tcl configuration script "tclConfig.sh"

    This is what I received trying to install TkBLT. What is tclConfig.sh?
    I did installed tcl/tk 8.4.9-3 as I mentioned before, I tried to find
    this file, but I don't have it in my filesystem. How to get it?
     
    dale cooper, Oct 31, 2005
    #3
  4. dale cooper

    Guest

    On Mon, Oct 31, 2005 at 03:17:05PM -0800, dale cooper wrote:
    > Thanks, but I've got another question:
    >
    > can't find Tcl configuration script "tclConfig.sh"


    This file comes from the following package:
    $ rpm -qf /usr/lib*/tclConfig.sh
    tcl-devel-8.4.9-3

    Fedora generally splits packages which are libraries into "foo" and "foo-devel"
    (and maybe others).

    Jeff

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.1 (GNU/Linux)

    iD8DBQFDZsRJJd01MZaTXX0RAuTCAKCn6VKuuzJ9h6+D3RHUfyZUWK10TQCfeF56
    m27PiTggLSs6hXRufx1Sq3A=
    =lH+/
    -----END PGP SIGNATURE-----
     
    , Nov 1, 2005
    #4
  5. dale cooper

    dale cooper Guest

    Thanks!
    At this moment I can see the first python generated Tk window on my
    screen. It's great ;-)))
     
    dale cooper, Nov 1, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Epler
    Replies:
    0
    Views:
    510
    Jeff Epler
    Aug 20, 2004
  2. Jeff Epler
    Replies:
    0
    Views:
    459
    Jeff Epler
    Aug 23, 2004
  3. Pierre Dagenais
    Replies:
    0
    Views:
    316
    Pierre Dagenais
    Aug 3, 2008
  4. Hidekazu IWAKI
    Replies:
    1
    Views:
    383
    Peter Otten
    Dec 14, 2009
  5. Hidekazu IWAKI
    Replies:
    0
    Views:
    527
    Hidekazu IWAKI
    Dec 15, 2009
Loading...

Share This Page