[vtkusers] ImportError with VTK 4.x, Python 2.2, BCC32 5.5

Charl P. Botha c.p.botha at its.tudelft.nl
Fri Sep 13 18:45:26 EDT 2002

Dear list,

I'm trying to get VTK 4.x (CVS checkout) going on Windows as well.  After
having built VTK with the downloadable Borland compiler version 5.5, I get
the following when trying to run the Cone.py example:

C:\Build\VTK\Examples\Tutorial\Step1\Python> \Python22\python Cone.py
Traceback (most recent call last):
  File "Cone.py", line 9, in ?
    from vtkpython import *
  File "c:\Build\VTK\Wrapping\Python\vtkpython.py", line 7, in ?
    from vtk import *
  File "c:\Build\VTK\Wrapping\Python\__init__.py", line 7, in ?
    from common import *
  File "c:\Build\VTK\Wrapping\Python\vtk\common.py", line 9, in ?
    from vtkCommonPython import *
ImportError: dynamic module does not define init function

The PYTHONPATH points to both c:\Build\VTK\bin (where
vtkCommonPython.{lib,dll,tds} live) and c:\Build\VTK\Wrapping\Python and my
PATH points to c:\Build\VTK\bin as well.  From the message (and from
experiments) it does seem that Python is finding the vtkCommonPython.dll,
but that it's not happy with it.

Does anyone have any ideas?  I had to convert the python22.lib with the
Borland coff2omf to build VTK successfully, if that's important.


charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/

More information about the vtkusers mailing list