[IPython-User] How to run mayavi with ipython?

klo uo klonuo@gmail....
Tue Mar 27 22:48:53 CDT 2012


I have VTK, and installed mayavi with this procedure:

========================================
git clone https://github.com/enthought/traits.git && cd traits && sudo
python setup.py install --prefix=$HOME/.local
git clone https://github.com/enthought/mayavi.git && cd mayavi && sudo
python setup.py install --prefix=$HOME/.local
========================================

Have some x, y, z data in np.array and launch this code from my editor:

========================================
from mayavi import mlab
s = mlab.mesh(x, y, z)
mlab.show()
========================================

Object shows fine, and I can do anything Mayavi plot GUI allows.

If I try to run above code (without "mlab.show()" line) from ipython
0.13.dev console I get Mayavi plot GUI, but it's frozen. I can't do
anything but forcibly terminate it, which also kills ipython console

If I try to run from ipython qtconsole, plot GUI seems fine except:
 - if I use save button from Mayavi toolbar - ipython kernel heartbeat
problem and kernel needs restart
 - If I try to go fullscreen - same issue
 - if I try to change preferences from Mayavi pipeline side window - same
issue

All this works fine if I run the code with python interpreter as python
script.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120328/dae555ba/attachment.html 


More information about the IPython-User mailing list