python - MayaVi ValueError, how to run with wx backend? -


at point, i'm trying started using mayavi, can not run within python shell/scripts. mayavi gui does work, however.

i'm trying run of examples found online (e.g. [1]), when attempt run them, seemingly ubiquitous error (e.g. [2], [3]) of:

value error: cannot set toolkit wx because has been set qt4 

the solutions above referenced threads seem be: discard wx , use qt4. however, i'm interested in embedding visualizations wxpython application, , use wx!

i have tried adding:

import matplotlib matplotlib.use('wxagg') 

to beginning of example script, not solve issue.

i running:

  • windows 7, 64 bit
  • enthought canopy python 2.7.6 (64 bit)
  • wxpython 3.0.2.0
  • mayavi 4.4.3
  • matplotlib 1.5.1

unsure else (if anything) may relevant.

is there solution can run mayavi wx?

sometimes, it's obvious solution. suggested in referenced solutions, rather setting ets_toolkit = "qt4", need set "wx". within script (at start) with:

import os os.environ['ets_toolkit'] = 'wx' 

and works fine!


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -