#2 Pmw.Blt & Python 2.0/2.1 doesn't work?


I've used Pmw.Blt with Python 1.5.2 with no problems,
but I can't get it to work with Python 2.0 or 2.1. With
2.1, I can get Pmw to work fine, but not Pmw.Blt. Is
there a known problem with this? Here is the session

Python 2.1b1 (#1, Mar 8 2001, 20:37:37)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)]
on linux2
Type "copyright", "credits" or "license" for more
>>> from Tkinter import *
>>> root=Tk()
>>> import Pmw
>>> Pmw.Blt.haveblt(root)
>>> root.tk.call('package', 'require', 'BLT')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TclError: couldn't load file "/usr/lib/libBLT.so.2.4":
/usr/lib/libBLT.so.2.4: undefined symbol:

The same dialogue on python1.5 has no problems

Python 1.5.2 (#1, Feb 1 2000, 16:32:16) [GCC
egcs-2.91.66 19990314/Linux (egcs- on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum,
>>> from Tkinter import *
>>> root=Tk()
>>> import Pmw
>>> Pmw.Blt.haveblt(root)
>>> root.tk.call('package', 'require', 'BLT')

I'm running Redhat 6.2, and the 1.5.2 python is 'out of
the box', while the 2.1 is compiled from source - could
this cause problems?



  • Greg McFarlane

    Greg McFarlane - 2001-04-04

    Logged In: YES

    Is it possible that either libBLT.so.2.4 does not exist
    or that it is a different version than the one you
    compiled python against? I suspect a versioning problem
    because of the error message:
    undefined symbol: Tk_CanvasTagsParseProc

  • Nobody/Anonymous

    Logged In: NO

    Same problem, on Linux Mandrake 8.2

    Python 2.2
    Pmw 1.1 just installed
    BLT 2.4.y just compiled

    When gregm talk about "a different version than the one you
    compiled python again"... Is BLT support built at tkinter
    compile time ?



  • Greg McFarlane

    Greg McFarlane - 2002-08-30

    Logged In: YES

    Blt is part of Tcl/Tk. You can check if python has access to
    Blt by running
    the following commands. One of the last two lines should
    return without
    an error (although both may not).

    import Tkinter
    root = Tkinter.Tk()
    root.tk.call('package', 'require', 'BLT')
    root.tk.call('load', '', 'Blt')

    If neither of the last two lines work, then you have a
    problem with your
    Blt installation, or your python or tcl interpreter can not
    find Blt. You need
    to fix this problem before Pmw.Blt will work.

  • Nobody/Anonymous

    Logged In: NO

    Same problem with python 2.2 and Blt 2.4.
    I think this is not a versionning problem since it work with


  • Greg McFarlane

    Greg McFarlane - 2002-11-08

    Logged In: YES

    A combination that I know does work (compiled from the
    source and linked statically) is:
    python 2.2.1
    tcl 8.3.2
    blt 2.4u

  • Nobody/Anonymous

    Logged In: NO

    This pages shows how to get BLT 2.4z working with python2.2


    (simple BLD makefile edit)


    However, I needed a more permanent solution. I went to
    blt2.4z/src/shared and rebuilt libBLT24.so with
    -L/usr/local/lib -ltk8.4 -ltcl8.4. By this, I mean that I
    found the gcc command that was used to produce libBLT24.so
    and added those bits to the end. I installed the new
    libBLT24.so into /usr/local/lib and the demo then worked
    without any LD_PRELOAD.

    An even better solution would be to fix the Makefile. This
    can be done by appending the appropriate string to the line
    in the Makefile for SHLIB_LD_FLAGS. The appropriate string
    will vary for you, depending on your versions of Tcl and Tk
    as well as the paths to libtclX.Y.so and libtkX.Y.so.

    A yet better solution would be to get this fixed in BLT
    itself. I will tell the developers about this when I have
    the time.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks