I am trying to install Python with VTK on my computer, but when I want to import VTK, I get an error:
import vtk
Traceback (most recent call last):
File
I was having this same problem on MacOSX. So I started using vtk/bin/vtkpython instead of python. This allowed me to import vtk without any errors. I then imported vtkCommonCorePython explicitly and printed the location:
$ /home/vtk/bin/vtkpython
vtk version 6.2.0
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtkCommonCorePython
>>> print vtkCommonCorePython
In the terminal, I then added the lib folder to my python virtual environment path:
$ add2virtualenv /home/vtk/lib
I don't know how this would translate to Windows, but I hope this helps!