InstallVTKPythonOnWin32

Steps for installing MayaVi (with Python interactivity) in Windows XP and compatible with [WWW] matplotlib

This page describes how you can install VTK-Python on Windows along with Python in order that you may script MayaVi from Python. Also provided are instructions on how to get MayaVi and matplotlib working together with [WWW] IPython. The instructions were written by Ryan Krauss.

Installing Python and other useful tools

I am starting with a computer that does not have a Python installation, so I will completely document everything I do. Assumptions (initial steps)

  1. Python 2.3.5 is installed

  2. Numeric is installed (I am using 23.8 from [WWW] http://sourceforge.net/project/showfiles.php?group_id=1369)

  3. [WWW] SciPy 0.3.2 is installed (SciPy_complete-0.3.2-win32-py2.3-num23.5.exe or P4 or PIII binary from [WWW] http://www.scipy.org/download)

  4. IPython is installed (I am using 0.5.16.win32.exe from [WWW] http://ipython.scipy.org/dist)

  5. [WWW] matplotlib is installed (I am using 0.83.1 from following the download link on the left hand side at

Mayavi and VTK installation

  1. Download VTK-Python-4.4.zip from [WWW] http://mayavi.sourceforge.net/dwnld/vtk/win32/

  2. Unzip VTK-Python-4.4.zip into C:\Python23

  3. Added C:\Python23\Scripts to you windows path variable

  4. Download the mayavi source tarball and unzip it anywhere. Download MayaVi-1.4.tar.gz from [WWW] http://sourceforge.net/project/showfiles.php?group_id=27020 .

  5. Open a command prompt in the directory where you unzipped the mayavi source and type python setup.py install (assuming C:\python23 is in your windows path)

  6. You will probably also want [WWW] pyVTK to generate data in vtk formats. Download, unzip the tarball and run python setup.py install.

  7. If you want to use matplotlib and mayavi in the same session, you must set your matplotlibrc file to use the TkAgg backend.

  8. Launch IPython with the -pylab or -tk flags (or both on Debian)

You should be in business.

last edited 2005-07-21 14:06:16 by Prabhu Ramachandran


SourceForge.net Logo