[vtkusers] VTK in Python -how?
Charl Botha
c.p.botha at tudelft.nl
Wed Sep 30 07:25:02 EDT 2009
> Another thing is that in my app, I append the path to the VTK Python
> bindings. But then I realised in order for my 'import vtk' line to work, my
> app's main script needed to be in the directory where vtkpython.exe has been
> installed. In my case: C:\Qt\VTKbin7\bin\release. Is there some way that I
> could use so that my app can use VTK outside of its bin directory? I tried
> adding its bin path to my system variables and also appended it at the top
> of my script: sys.path.append("C:\Qt\VTKbin7\bin\release").
See the instructions at
http://cpbotha.net/2009/08/13/python-2-6-enabled-vtk-5-4-windows-binaries/
If you add, under windows, the necessary paths to PATH and PYTHONPATH,
import vtk should work in your normal "python" executable.
More information about the vtkusers
mailing list