[Mne_analysis] Questions with regard to replicate tutorial examples

zuxfoucault Wong zuxfoucault at gmail.com
Mon Jan 25 04:51:32 EST 2016
Search archives:

Dear all,

I try to replicate the example in
http://martinos.org/mne/stable/auto_tutorials/plot_source_localization_basics.html
.

However, there's some problem with PySurfer.
I use Jupyter notebook to run the code. In PySurfer document, it use PyQT (
export QT_API=pyqt ). I'm wondering if I use %matplotlib inline magic,
should I still have to use PyQT. From the tutorial, it seems the results
were shown in notebook environment.

I'm trying to find the TraitsBackendWX backend connector to install (as the
error message complained). But I can't find the proper TraitsBackendWX
package to install.

Any advice would be appreciated!

The following is the traceback.

---------------------------------------------------------------------------ImportError
                              Traceback (most recent call
last)<ipython-input-12-c34103ae717e> in <module>()      2       3
subjects_dir = data_path + '/subjects'----> 4 brain =
stc.plot(surface='inflated', hemi='rh', subjects_dir=subjects_dir)
/mne-python/mne/source_estimate.pyc in plot(self, subject, surface,
hemi, colormap, time_label, smoothing_steps, transparent, alpha,
time_viewer, config_opts, subjects_dir, figure, views, colorbar, clim)
  1364
subjects_dir=subjects_dir, figure=figure,   1365
                views=views, colorbar=colorbar,-> 1366
                      clim=clim)   1367         return brain   1368
/Volumes/SSD/Space/utility/mne-python/mne/viz/_3d.pyc in
plot_source_estimates(stc, subject, surface, hemi, colormap,
time_label, smoothing_steps, transparent, alpha, time_viewer,
config_opts, subjects_dir, figure, views, colorbar, clim)    638
  kwargs['views'] = views    639     with
warnings.catch_warnings(record=True):  # traits warnings--> 640
 brain = Brain(subject, hemi, surface, **kwargs)    641     for hemi
in hemis:    642         hemi_idx = 0 if hemi == 'lh' else 1
/Volumes/SSD/Space/vEnvs2/ipy2/lib/python2.7/site-packages/surfer/viz.pyc
in __init__(self, subject_id, hemi, surf, curv, title, cortex, size,
background, foreground, figure, subjects_dir, views, show_toolbar,
offscreen, config_opts)    393
self._set_window_properties(size, background, foreground)    394
  figures, _v = _make_viewer(figure, n_row, n_col, title,--> 395
                             self._scene_size, offscreen)    396
  self._figures = figures    397         self._v = _v
/Volumes/SSD/Space/vEnvs2/ipy2/lib/python2.7/site-packages/surfer/viz.pyc
in _make_viewer(figure, n_row, n_col, title, scene_size, offscreen)
210             # Triage: don't make TraitsUI if we don't have to
211             if n_row == 1 and n_col == 1:--> 212
figure = mlab.figure(title, size=(w, h))    213
mlab.clf(figure)    214                 figures = [[figure]]
/Volumes/SSD/Space/vEnvs2/ipy2/lib/python2.7/site-packages/mayavi-4.4.4.dev0-py2.7-macosx-10.11-x86_64.egg/mayavi/tools/figure.pyc
in figure(figure, bgcolor, fgcolor, engine, size)     62     else:
63         if engine is None:---> 64             engine = get_engine()
    65         if figure is None:     66             name =
max(__scene_number_list) + 1
/Volumes/SSD/Space/vEnvs2/ipy2/lib/python2.7/site-packages/mayavi-4.4.4.dev0-py2.7-macosx-10.11-x86_64.egg/mayavi/tools/engine_manager.pyc
in get_engine(self)     95                                 if
e.__class__.__name__ == 'Engine']     96         if len(suitable) ==
0:---> 97             return self.new_engine()     98         else:
 99             # Return the most engine add to the list most
recently.
/Volumes/SSD/Space/vEnvs2/ipy2/lib/python2.7/site-packages/mayavi-4.4.4.dev0-py2.7-macosx-10.11-x86_64.egg/mayavi/tools/engine_manager.pyc
in new_engine(self)    140             options.    141         """-->
142         check_backend()    143         if options.backend ==
'envisage':    144             from mayavi.plugins.app import Mayavi
/Volumes/SSD/Space/vEnvs2/ipy2/lib/python2.7/site-packages/mayavi-4.4.4.dev0-py2.7-macosx-10.11-x86_64.egg/mayavi/tools/engine_manager.pyc
in check_backend()     47 wxPython: http://www.wxpython.org/     48
PyQT: http://www.riverbankcomputing.co.uk/software/pyqt/intro---> 49
''')     50      51
ImportError: Could not import backend for traits
_______________________________________________________________________________
Make sure that you have either the TraitsBackendWx or the TraitsBackendQt
projects installed. If you installed Mayavi with easy_install, try
easy_install <pkg_name>. easy_install Mayavi[app] will also work.

If you performed a source checkout, be sure to run 'python setup.py install'
in Traits, TraitsGUI, and the Traits backend of your choice.

Also make sure that either wxPython or PyQT is installed.
wxPython: http://www.wxpython.org/
PyQT: http://www.riverbankcomputing.co.uk/software/pyqt/intro

Foucault
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160125/dce9acef/attachment.html 


More information about the Mne_analysis mailing list