[vtkusers] How to import vtk in python?

Lin M majcjc at gmail.com
Thu May 21 21:50:50 EDT 2015


Hi Dr. Thompson,

Thank you!

I tried to add lib and bin folder to the PYTHONPATA but it still failed to
find the module.

Running vtkPython directly leads python command line with correct vtk
module but I'm not very clear about how to run the python test in this way.

PS. I found two executable files vtkWrapPython-6.3.exe and
 vtkWrapPythonInit-6.3.exe. What's the use of them?

Best,
Lin

On Thu, May 21, 2015 at 9:09 PM, David Thompson <david.thompson at kitware.com>
wrote:

> > ... Try setting the PYTHONPATH environment variable to include VTK's lib
> and lib/site-packages directories. ...
>
> Correction: lib/site-packages is the way ParaView organizes things, not
> VTK.
>
> You still need to add lib (and maybe bin on Windows) to PYTHONPATH, in
> addition to Wrapping/Python.
>
>         David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150521/4b4f2a19/attachment.html>


More information about the vtkusers mailing list