MayaVi Installation Instructions

The MayaVi home page is at: http://mayavi.sourceforge.net. Please visit there for the latest information on MayaVi. This document describes the installation procedures for MayaVi.

There are currently two ways of installing MayaVi.

The stand-alone binaries are available for Win32 and Linux. They allow you to install MayaVi as an application without having to install VTK or even Python! If you are going to use MayaVi from Python then you should only install it from the sources.

Installation as a binary

Currently there are two binaries available. One for Win32 and the other for Linux. Both were made using Gordon McMillan's excellent Installer. Installing them is pretty straight forward. The download is pretty big since it comes bundled with everything necessary to run MayaVi.

Both the binary installations ship with a doc/ directory containing a quick installation guide, README, etc. and a user guide in doc/guide/book1.html. Also included is an examples/ directory that contains a sample VTK data file of a heart CT scan and a visualization based on that data.

Binary installation under Windows

Just download the binary, run it to start the installation, answer the questions on where you want to install it etc. That's it!

Binary installation under Linux

Installing the Linux binary is a bit more complicated because there are so many Linux distributions and versions out there. The Linux binary is simply a gzipped tarball. Untar it and run the mayavi program in the untarred directory. The binary requires the following:

If you have these installed MayaVi should run fine. In case you want to install MayaVi in a system wide location its best to install it somewhere and then copy the shell script mayavi thats in the tarball to /usr/local/bin/ (or /usr/bin/) and edit it to use the directory where the executable mayavi.exe is actually installed.

Installation from Sources

MayaVi uses distutils for the installation process.

Installation of MayaVi

If the requirements are all met, installing MayaVi is simple. Download the tarball, untar it change directory to the new directory and do the following:

      % python setup.py install
    
Thats all there is to it. Under Linux you might want to run this command as root. For more help on distutils look here.

Please note that if you simply want to run MayaVi without installing it as a module you can always run it straight from the untarred directory like so:

      % mayavi [options]
    

Once you have MayaVi installed and running, you can test out a simple example by using the example files in the examples/ directory of the sources. The directory contains a sample VTK data file of a heart CT scan and a visualization based on that data. To run this visualization use the File->Load->Visualization menu and choose the example in the examples directory of the MayaVi source tree. If this loads fine then you are all set! For more information on how to use MayaVi read the MayaVi users guide. This guide is also included along with the source and is in the doc/guide/ directory.

Requirements

Usually the hardest part of a MayaVi install when using the sources is getting the VTK Python bindings installed properly. The next section tries to address this.

Installation of VTK

Before you can run MayaVi you need to have VTK installed and working properly. There are two ways to install VTK on any platform. One way is to build the packages from the sources and the other is to download pre-built binary packages. VTK is a huge package and building from source is not for the weak hearted. You can download binaries and sources from the VTK download page. However you might find that these binaries are rather dated. VTK is currently under heavy development and a spanking new VTK 4.0 release is likely to be out soon. This should make it much easier to build/install VTK.

Instructions for building VTK are beyond the scope of this document but should be available at the the VTK download page and should also be included with the VTK sources. Note that when building VTK from the sources make sure that you build the Python bindings along with TkWidget support.

Pre-built VTK packages are available for Linux and Win32 and these are mentioned below. If installing VTK from sources is a hassle you should consider trying these instead.

Linux binaries
RPMS are available from the the VTK download page but these are likely to be dated. A tarball containing all the necessary libraries/modules in order to use VTK from Python is available here. This build uses the VTK-4.0 CVS tree and has been built on the Debian GNU/Linux woody (testing) distribution. The build uses Python 2.1. More details on the installation etc. are available in the README.txt included at the site.
Binaries for Windows
Windows binaries are also available at the VTK download page. The problem with these is that as of now the Python DLL's are built with Python-1.5.2 and Tcl/Tk 8.0. So these binaries will not work with Python 2.x. Les Schaffer has built DLL's for Python 2.x. They should be available from here. This package has all the necessary items for MayaVi compiled in. Instructions on how to install it are available at the site.

Hopefully, with more people using it, VTK should become easier to install in the future. The Linux and win32 binaries pages should be updated reasonably often so do check them out.

Testing your VTK installation

Included along with the MayaVi source is a file called test_vtk.py in the doc directory. Run this to test your VTK installation like so:

      % python test_vtk.py
      

If this runs without either an error or a segfault then your VTK installation is ok. You should next install MayaVi from the source and try to run it. If you have trouble the script will tell you where it failed. At this point if you are unable to proceed email us.



Last modified: Mon Nov 19 11:07:06 IST 2001