I have built manually VTK 8.1, enabling the modules for vtkPython, vtkWrappingPythonCore, VTK_WRAP_PYTHON and VTK_ENABLE_VTKPYTHON, but I cannot seem to get it to work. I am using and built VTK with Python 3.5.0 on a Windows 10 machine.
When I from vtk import *
in a cmd python
interpreter, I get a PyThreadState_Get: no current thread
error, when I from vtk import *
in the vtkPython shell I get this:
Traceback (most recent call last):
File "D:\Users\Sandro Massa\Code\vtk-git\install\lib\python3.5\site-packages\vtk\vtkCommonCore.py", line 5, in <module>
from .vtkCommonCorePython import *
ImportError: No module named 'vtk.vtkCommonCorePython'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\Users\Sandro Massa\Code\vtk-git\install\lib\python3.5\site-packages\vtk\__init__.py", line 7, in <module>
from .vtkCommonCore import *
File "D:\Users\Sandro Massa\Code\vtk-git\install\lib\python3.5\site-packages\vtk\vtkCommonCore.py", line 9, in <module>
from vtkCommonCorePython import *
ImportError: No module named 'vtkCommonCorePython'
I have the following directories in my PATH variable:
C:\Program Files\Python 3.5\Lib\site-packages
C:\Program Files\Python 3.5\Lib\site-packages\vtk
D:\Users\user\Code\vtk-git\install\bin
and in my PYTHONPATH variable:
C:\Program Files\Python 3.5\Lib\site-packages
C:\Program Files\Python 3.5\Lib\site-packages\vtk
The vtkCommonCorePython.pyc
is accessible from both the PATH and the PYTHONPATH, I don't know what else to do. Any ideas?