[SciPy-user] 3d plotting question

Prabhu Ramachandran prabhu_r at users.sf.net
Thu Sep 29 08:15:57 CDT 2005

>>>>> "Christian" == Christian Kristukat <ckkart at hoc.net> writes:

    >> http://www.enthought.com/enthought/wiki/TVTK

    Christian> That sounds very interesting. Do I need a complete
    Christian> enthought installation to be able to use tvtk? Anyway I
    Christian> couldn't build enthought so I would need some hints
    Christian> here. I tried python setup_enthought.py build in a
    Christian> fresh svn copy and I get the following error:

Thanks for trying this out.  In the next couple of days I'll create a
wiki page for installation and also post on this list with a link.
For now here are some initial instructions (which will eventually get
on the wiki).


 1. SciPy (and therefore numerix)
 2. You will need arrayobject.h (i.e. the dev package for numerix).
 3. A working VTK-Python installation.
 4. For the UI you will need a working wxPython-2.6.x.
 5. *Optionally* (if you want to try chaco, enable, kiva etc.) you
    will need SWIG to build kiva.  This is *not* necessary for TVTK.
    Note that SWIG is packaged with Enthon (see below).

Note that none of this is really tested under Mac OS X.  I'll defer to
Robert Kern for issues on that platform :).  TVTK and MayaVi2 and
friends all work on Linux and Win32.

On Win32:

Under win32 you can simply install this version of Enthon (it works
for me on XP) to get *all* the requirements:


In fact, if you install this, you may simply get the enthought svn
tree (as shown below) and double click on
enthought/src/build_inplace.bat and you should be all set except
you'll need to set your PYTHONPATH to point to the enthought directory
(also shown below).

Building and setup

Once you have the requirements setup.  You can do the following:

 $ svn co http://www.enthought.com/svn/enthought/trunk enthought

 $ # Build traits.
 $ cd enthought/src/lib/enthought/traits
 $ python setup.py build_ext --inplace

 $ # Build tvtk
 $ cd ../tvtk
 $ python setup.py build_ext --inplace

 # For want of a working installer, lets just set PYTHONPATH for now.
 $ export PYTHONPATH=$PYTHONPATH:/path/to/enthought/src/lib/

 Then try this:
 $ cd examples
 $ python tiny_mesh.py
 $ python simple.py
 $ python ivtk_example.py

If that works, you are ready to play with mlab.py which is inside
enthought/tvtk/tools/mlab.py.  You can run the file as it is, to see a
spherical harmonic on screen.  See the source for some nice examples.

If you have come this far, I hope you are rewarded by all the new
tools you can play with. :)


More information about the SciPy-user mailing list