[IPython-dev] [MayaVi-users] Updated build of trunk-dev available
fperez.net at gmail.com
Mon Jan 18 17:54:59 EST 2010
On Mon, Jan 18, 2010 at 5:37 AM, Gael Varoquaux
<gael.varoquaux at normalesup.org> wrote:
> I am a bit surprised. Fernando, could it be that you don't have the QT
> backend installed for Traits? It will be named something like
Thanks, that was it! I didn't realize I hadn't installed enough of
the traits packages on my Karmic box, sorry...
Now I do get a different error though:
In : run qt_embedding.py
ImportError Traceback (most recent call last)
/home/fperez/Desktop/qt_embedding.py in <module>()
17 Int, Dict
18 from enthought.traits.ui.api import View, Item
---> 19 from enthought.mayavi.core.ui.api import MayaviScene, MlabSceneModel, \
21 from enthought.mayavi import mlab
ImportError: No module named api
Is it possible to have a version of your script that runs with the
mayavi shipped in Karmic?
Because now with Gael's note and your script, I was able to test
In : import os
In : os.environ['ETS_TOOLKIT'] = 'qt4'
In : gui qt
In : from enthought.mayavi import mlab
In : mlab.test_molecule ()
(<enthought.mayavi.modules.glyph.Glyph object at 0xc949cbc>,
<enthought.mayavi.modules.glyph.Glyph object at 0xd1002cc>,
<enthought.mayavi.modules.glyph.Glyph object at 0xd13ecbc>,
<enthought.mayavi.modules.glyph.Glyph object at 0xd152c8c>)
In : mlab.figure()
Out: <enthought.mayavi.core.scene.Scene object at 0xd2af65c>
In : mlab.test_surf ()
Out: <enthought.mayavi.modules.surface.Surface object at 0xdc381dc>
In : mlab.test_surf ()
Out: <enthought.mayavi.modules.surface.Surface object at 0xd16250c>
In : pylab qt
Welcome to pylab, a matplotlib-based Python environment [backend: Qt4Agg].
For more information, type 'help(pylab)'.
In : plt.figure()
Out: <matplotlib.figure.Figure object at 0xdc5666c>
In : plot(sin(linspace(0,2*pi,200)**2)
Out: [<matplotlib.lines.Line2D object at 0xe69dbcc>]
And everything is fine: mayavi windows open up, their qt dialogs work,
I can then load pylab with the qt backend and it works, etc. It's
*really* cool, in fact.
So I'd love to be able to reproduce your bug, so we can track it down
to either something we need to fix in ipython or something that can be
fixed upstream in mayavi...
More information about the IPython-dev