[vtkusers] VTK Python Wrapper and OS X

Jeremy Guralnick jg at tachyon.net
Wed Dec 17 13:06:17 EST 2003


I've been trying to get the python wrapper to work under OS X (10.2.8)
without success. Whether I use python or vtkpython I get the following
error:

Python 2.2.2 (#1, 01/12/03, 07:51:34)
[GCC Apple cpp-precomp 6.14] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/Users/jg/Tachyon/Develop/VTK/Wrapping/Python/vtk/__init__.py", line
7, in ?
    from common import *
  File "/Users/jg/Tachyon/Develop/VTK/Wrapping/Python/vtk/common.py", line
7, in ?
    from libvtkCommonPython import *
ImportError: Loaded module does not contain symbol _initlibvtkCommonPython
>>> 

I've tracked this down to the file
${VTK_DIR}/VTKBuild/Common/vtkCommonPythonInit.cxx, which includes the
missing reference from above. The problem appears to be that the build
process does not compile this file (no object file produced) or attempt to
link it (no link errors). After a build, the "Common" directory contains 301
".cxx" files and 463 ".o" files including 150 object files with "Python" in
the filename, so a system appears to be built with the python wrapper.

Other than python, the system otherwise works fine. I've run several of the
C++ and Tcl tests with no problems. I've also tried both VTK 4.2.2 and 4.2.1
with the same result. Other data that might help are:

cmake 1.6.6 from darwinports
Python 2.2.2 from fink
Tcl 8.4 from fink

Any help/insight on this problem would be greatly appreciated.

Jeremy




More information about the vtkusers mailing list