Python Part 1: Installing, configuring, and testing Python and VTK
Download the following files:
Step 1: Install Python
First we will install python. To do so you merely need to double-click on Python-2.2.2.exe. You can change where it installs if you wish, but for the purposes of this tutorial it would be easiest if you just let it install to the default location (c:\python22). Leave all the default options on when installing.
Step 2: Install wxPython
wxPython is a GUI developement toolkit for python. Install it by double-clicking on wxPythonWIN32-188.8.131.52-Py22.exe. Make sure you install it to the location where you installed python. If you installed python to the default location then the default location this recommends will be correct.
Step 3: Uncompress pyvtk.zip
Extract pyvtk.zip to the root python install directory.
It's important that you make sure you tell it to keep it's directory
When done you should end up with a folder structure looking similar to this:
Step 4: Extract the dlls in vtkdlls.zip
Extract the dlls in vtkdlls.zip to someplace in your windows
path. Recommended is your system directory. On windows 2000 the default
will be c:\winnt\system32 on Windows XP the default is c:\windows\system32
Note: When you extract the dll's it puts them in a vtk40 folder by default
We do not want them in that folder. The dll's need to be in the system32 folder.
Step 5: Test the installation
Browse to C:\Python22\Lib\site-packages\VTK (or <python install dir>\Lib\site-packages\VTK if you installed elsewhere) and double-click on vtkRenderWidget.py to test your installation. If successful a window should show up displaying a cone
Congratulations. If you can see the cone you now have python set up to use vtk.