Python / VTK problem

Randall Hopper aa8vb at
Fri Jun 25 13:32:08 EDT 1999

Greg Wilson:
 |Hi, folks.  I've just downloaded, compiled, and installed VTK 2.3, and
 |for the first time, I've built with Python extensions enabled.
 |Unfortunately, while I can run the Tcl examples, I can't get the Python
 |examples to run.  The command 'python' (or similar) produces:
 |  Traceback (innermost last):
 |    File "./", line 2, in ?
 |      from libVTKGraphicsPython import *
 |ImportError: /home/gvwilson/lib/ undefined
 |symbol: XtStrings
 |The symbols XtStrings is defined in /usr/X11R6/lib/ (I'm on Red
 |Hat Linux).  The directory /usr/X11R6/lib is in my LD_LIBRARY_PATH and in
 |my PYTHONPATH, as is /home/gvwilson/lib (which contains symbolic links to
 |the VTK .so's).  I'd be grateful to anyone who can tell me what I'm doing

It sounds like wasn't implicitly linked with when you compiled VTK.  No problems here on IRIX; it appears that
the linker pulled it in automatically.

To check:

   > cd vtk/graphics
   > ldd
     [you should see in the list; but I'd wager that you won't]
   > rm
   > make
     [VTK doesn't explicitly link in Xt, but it probably should]

A quick nm of the source files linked into libVTKGraphicsPython reveals
that vtkXRenderWindowInteractor.o depends on Xt calls.

Try adding a:

   X_EXTRA_LIBS = -lXt -rpath /usr/X11R6/lib

to your user.make file.


This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.

More information about the vtkusers mailing list