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