[vtkusers] How to import vtk in python?

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


Hi all,

When I'm trying to import vtk in python 2.7, it showed that

>>> import vtk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"C:\Users\Marlin\Documents\Projects\VTK\VTK-dev\bin\Wrapping\Python\vtk\__init__.py",
line 39, in <module>
    from vtkCommonCore import *
  File
"C:\Users\Marlin\Documents\Projects\VTK\VTK-dev\bin\Wrapping\Python\vtk\vtkCommonCore.py",
line 1, in <module>
    from vtkCommonCorePython import *
ImportError: No module named vtkCommonCorePython

I have turned the VTK_WRAP_PYTHON on and set the environment variable
PYTHONPPATH with BIN_PATH/Wrapping/Python.

Does anyone have any idea about that? Thank you very much!

Best,
Lin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150521/acebd3cd/attachment.html>


More information about the vtkusers mailing list