What's your Matplotlib backend?
in the ~/.matplotlib/matplotlibrc file, there should be the choice
for the backend. (Mine is around 31)
backend : Qt4Agg
Below there is the extract from mine.
# the default backend; one of GTK GTKAgg GTKCairo CocoaAgg FltkAgg
27 # MacOSX QtAgg Qt4Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG Template
28 # You can also deploy your own backend outside of matplotlib by
29 # referring to the module name (which must be in the PYTHONPATH) as
30 # 'module://my_backend'
31 backend : Qt4Agg
32 #backend : GTKCairo
33 #backend : WXAgg
P.S.: I included the neuronvisio ML, 'cause it could be useful for
others as well.
HIH,
Michele
On Tue, Sep 27, 2011 at 5:43 PM, Nacer Bouchekhima
<a.bouc...@warwick.ac.uk> wrote:
> Hi Michelle,
> I am trying to install neuronvisio in Ubuntu 10.04 which comes with python
> 2.6 as its default version.
> I followed the steps
> in http://mattions.github.com/neuronvisio/install.html but when I launch
> nrnvisio from the command line or using python –q4thread I get this error:
> =======================
> You must use the Qt4 backend to be able to use Neuronvisio.
> Check your backend in ~/.matplotlib/matplotlibrc and set it to Qt4Agg
> =======================
> Any hel p would very much appreciated
> Nacer
> --------
> Centre for Complexity Science,
> Zeeman Building,
> University of Warwick,
> Coventry
> CV4 7AL,
> UK
> Tel: 024761 50862
>
Here it is:
Copy the file from /etc/matplotlibrc
to ~/.matplotlib/matplotlibrc
cp /etc/matplotlibrc ~/.matplotlib/matplotlibrc
and then change the backend to Qt (by default Ubuntu is shipped with
gtk backend for matplotlib ) ;)
backend : Qt4Agg
HIH,
Michele.
Cheers,
Michele.
On Wed, Sep 28, 2011 at 11:14 AM, Nacer Bouchekhima
<a.bouc...@warwick.ac.uk> wrote:
> Sorry to bother you again I am getting the following error:
>
>
> ======================================
> In [5]:
> ---------------------------------------------------------------------------
> AttributeError Traceback (most recent call last)
>
> /usr/local/lib/python2.6/dist-packages/neuronvisio/controls.pyc in
> launch_visio(self)
> 149 self.ui.statusbar.showMessage(msg, 3500)
> 150 if not hasattr(self, 'visio'):
> --> 151 self.visio = Visio(self.ui.sec_info_label,
> self.manager)
> 152 self.visio.draw_model()
> 153
>
> /usr/local/lib/python2.6/dist-packages/neuronvisio/visio.pyc in
> __init__(self, sec_info_label, manager)
> 131 figure = self.mayavi.visualization.scene.mlab.gcf()
> 132 self.outline = None
> --> 133 self.picker = figure.on_mouse_pick(self.picker_callback,
> type='cell')
> 134
> 135 # ScalarBar and time_point
>
>
> AttributeError: 'Scene' object has no attribute 'on_mouse_pick'
>
> ======================================
>
>
> Whenever I load my ".hoc" file neuronvisio crashes issuing the above
> message?
>
> Is it to do with mayavi?
>
>
> Nacer
>
> Dr. Nacer Bouchekhima
the problem you didn't compile the mod file, then NEURON can't
instantiate the model, and then Neuronvisio fails 'cause there is no
model to plot.
in the output there should be something like:
In [2]: h.load_file('leak.hoc')
NEURON: syntax error
in leak.hoc near line 5
insert leak
^
xopen("leak.hoc")
execute1("{xopen("leak.hoc")}")
load_file("leak.hoc")
This means NEURON is looking for the compiled leak.mod, it doesn't
find it and then it fails.
To fix this, you always need to run
nrnivmodl
to compile your mod file first. (On Linux, on windows the name of the
executable is different)
Then everything should work as expected. (works here.)
HIH,
Michele
2011/9/28 Nacer Bouchekhima <a.bouc...@warwick.ac.uk>:
> Thanks for the reply.
> These are the steps which lead to the crash:
>
> 1) > ipython -q4thread
> 2) In [1]: from neuronvisio.controls import Controls3) In [2]: from neuron
> import h
> 4) In [3]: controls = Controls()
> At this stage I Neuronvisio GUI
> 5) In [4]: h.load_file('leak.hoc') Out[4]: 1.0
> 6) Now when I press on Plot3d button on the GUI I get
> The following
> =================================================================>
> In [5]:
> ---------------------------------------------------------------------------
> AttributeError Traceback (most recent call last)
>
> /usr/local/lib/python2.6/dist-packages/neuronvisio/controls.pyc in
> launch_visio(self)
> 149 self.ui.statusbar.showMessage(msg, 3500)
> 150 if not hasattr(self, 'visio'):
> --> 151 self.visio = Visio(self.ui.sec_info_label,
> self.manager)
> 152 self.visio.draw_model()
> 153
>
> /usr/local/lib/python2.6/dist-packages/neuronvisio/visio.pyc in
> __init__(self, sec_info_label, manager)
> 131 figure = self.mayavi.visualization.scene.mlab.gcf()
> 132 self.outline = None
> --> 133 self.picker = figure.on_mouse_pick(self.picker_callback,
> type='cell')
> 134
> 135 # ScalarBar and time_point
>
>
> AttributeError: 'Scene' object has no attribute 'on_mouse_pick'
> =================================================================<
>
>
>
>
> I am also attaching the leak.hoc and leak.mod files
>
> Thanks for your help
do you have pyqt installed?
No problem, keep sending the mail to the list. It's fine :)