[vtkusers] Python wrapping

Gib Bogle g.bogle at auckland.ac.nz
Sun Nov 2 01:09:52 EST 2014


Hi David,

All the .pyd files are where they should be, and all the vtk*PythonD.dll files are where they should be, in C:\vtk-vs10-x64\bin, which is in the PATH.  The point of my question was that the VTK release build did not create any vtk*Python.dll files, although it did create the .lib files.  Correct me if I'm wrong, but I think that vtkpython is looking for the missing DLL files - specifically, for vtkRenderingPython.dll.  Am I wrong in thinking that they should have been built?

Gib
________________________________
From: David Gobbi [david.gobbi at gmail.com]
Sent: Sunday, 2 November 2014 4:11 p.m.
To: Gib Bogle
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Python wrapping

Hi Gib,

The python modules are called "vtk*Python.pyd" on Windows.
On your system, I'm guessing that they should be in this directory:
c:\VTK-VS10-x64\lib\site-packages\vtk

And, in order for the modules to be loaded, all of the VTK DLLs
must also be in your PATH.  Either that, or you can copy them all
into c:\VTK-VS10-x64\lib\site-packages\vtk so that the .pyd files
will be able to find them there.

The vtk*PythonD.dll files are not python modules, they are support
libraries that are needed by the python modules.

 - David



On Sat, Nov 1, 2014 at 8:54 PM, Gib Bogle <g.bogle at auckland.ac.nz<mailto:g.bogle at auckland.ac.nz>> wrote:
I just rebuilt VTK-5.10.1 64-bit on Windows with VTK_WRAP_PYTHON ON.  The build completed without errors.  I do not understand why I have 14 .lib and .dll files named vtk*PythonD.dll and vtk*PythonD.lib, and 14 .lib files named vtk*Python.lib, but no vtk*Python.dll.  This causes my attempt to run a VTK-Python example to fail like this:

D:\testing\VTK\Superquadric>vtkpython superquadric.py
Traceback (most recent call last):
  File "superquadric.py", line 1, in <module>  import vtk
  File "c:\VTK-VS10-x64\lib\site-packages\vtk\__init__.py", line 63, in <module>  __helper.refine_import_err('rendering', 'vtkRenderingPython', exc)
  File "c:\VTK-VS10-x64\lib\site-packages\vtk\__helper.py", line 32, in refine_import_err raise LinkError, str(exc)
vtk.__helper.LinkError: DLL load failed: %1 is not a valid Win32 application.

I see that somebody was asking exactly the same question back in October, 2010, but there was no answer.

Any suggestions?

Thanks
Gib

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141102/4a0a29b6/attachment.html>


More information about the vtkusers mailing list