You can always check my Latest VTK Windows binaries page to make sure you have the latest blog posting and hence the latest binaries. It also links to the “old” Python 2.5 VTK 5.4.1 binaries.
I’ve made available my home-baked VTK 5.4.2 Windows binaries. These have the new-and-improved version of my python-exception-patches integrated (more about this in a future post; a serious dead-lock has been fixed and as a side-effect, you can now run multiple VTK pipelines in different threads!) and have been built with Visual Studio 2008 (9.0) SP1 on Windows XP SP3 with full Python 2.6 support. Get the binaries (or my patched source) from the two links below. You want the binaries if you want to use VTK from Python.
- Binaries: VTK-5-4-2-Py26-VS9sp1-win32-cpbotha.net.zip
- Source: VTK-5-4-2-source-cpbotha.net.zip
IMPORTANT: you might have to install the MS VS2008 SP1 vcredist_x86 package (free!) if you want to use these DLLs (thanks Jelle for pointing this out). This might not be necessary if you already have one or more of the MS development environments installed.
Please leave a comment on this blog posting if you use these or just hate them. It’s almost like postcard-ware, but with blog comments. Please also link to this page and not directly to the download location, thanks!
To use this from Python, you need to add the following to your PATH:
- d:\opt\VTK\bin
You also need to add all of the above to PYTHONPATH, as well as the following:
- d:\opt\VTK\lib\site-packages
… where d:\opt is the drive and directory where you unpacked the ZIP file.
Once you’ve done this and logged out and in again, “import vtk” should work at the Python prompt. Shameless plug: you can use my free envedit software to do the environment editing. It beats the default XP editing thingy.