I have installed python on Windows through Python (X,Y) v2.7.10. If I try to import the module vtk.tk.vtkTkRenderWindowInteractor, I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\vtk\tk\vtkTkRenderWindowInteractor.py", line 16, in <module>
from vtkLoadPythonTkWidgets import vtkLoadPythonTkWidgets
File "C:\Python27\lib\site-packages\vtk\tk\vtkLoadPythonTkWidgets.py", line 2, in <module>
import vtkCommonCorePython
ImportError: No module named vtkCommonCorePython
The PATH variable is correctly set, and contains "C:\Python27\Lib\site-packages\vtk", wich contains the file vtkCommonCorePython.pyd.
Has anyone had this issue or has a solution?
Edit: Solved but won't work
VTK has decided to drop support for Tkinter widgets, so if You, like me, want it back, we can ask for it here: http://vtk.uservoice.com/forums/31508-general/suggestions/9291084-return-support-for-tkinter-widgets
Thanks to @GregNash, and his question How do I use Liclipse to write a ParaView script? I found the solution.
Python(x,y) didn't create the environment variable PYTHONPATH. Simply creating the variable solved the problem:
PYTHONPATH: C:\Python27\Lib\site-packages\vtk;