enthought - How to get MayaVi2 to default to/use Qt rather than wx? -


previously have been using python environment maintained mac ports. had basic scripts using pyqt, vtk, matplotlib etc. have been able use paraview seem little heavy uses though try mayavi2 (and tvtk).

i downloaded , tried manually installing proved troublesome. thought bite bullet , try canopy (academic license). based on vtk/mayavi on mac os x suggests in world of qt, vtk , mayavi, installed 64 bit canopy.

i having trouble getting mayavi2 work within canopy environment. runs, console gets lots of errors, if call dialog/setting box "buttons" don't work properly. here first error (of couple of screen fulls) when try start mayavi2:

(canopy 64bit) scratch_pad 501 $mayavi2 traceback (most recent call last): file "/applications/canopy.app/appdata/canopy-1.0.0.1160.macosx-x86_64/canopy.app/contents/lib/python2.7/site-packages/pyface/ui/wx/splash_screen.py", line 121, in _on_paint dc = wx.paintdc(window)

i more interested in tvtk, tried of mayavi demos website gallery http://docs.enthought.com/mayavi/mayavi/auto/examples.html few tried kind-a worked, display vtk (?) window/scene, can interact vtk window. until open settings/dialogue window, , none of dialogue window "button" work , have force quit. here last line of error when open "setting" button in plot3d demo:

simple demo: file "/users/michael/library/enthought/canopy_64bit/system/lib/python2.7/site-packages/wx/_core.py", line 9162, in destroychildren return core.window_destroychildren(*args, **kwargs) wx._core.pyassertionerror: c++ assertion "geteventhandler() == this" failed @ /build/wxpython-src-2.9.2.4/src/common/wincmn.cpp(468) in ~wxwindowbase(): pushed event handlers must have been removed

i tried

ipython --gui=wx

(as suggested on page) in case crashes, no window.

based on error messages on console appear wx related. understanding the canopy environment "self-contained", old environment somehow conflicting? how test this?

is there way, environment variable, mayavi2 can use qt instead of wx? don't use wx in of local python scripts, unless needed in canopy quite happy disable, if option.

any ideas?

after running of examples in mayavi gallery have discovered needed inform traits use qt. done setting environment variable within script using sys.environment() call. decided set environment variable ets_toolkit qt4 in .profile follows:**

export ets_toolkit=qt4 

mayavi2 works advertised!


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -