Either nrngui or conda-forge neuron work, but not both?
Posted: Fri Oct 05, 2018 7:15 am
I have installed neuron in an Ubuntu 18.04.1 machine and nrngui and nrniv work fine.
I can also run python code with
The code of foo.py is simply
and the code pops up an Iconify window and plots a graph.
However if I try then I get a ModuleNotFoundError: No module named 'neuron'
On the other hand, if I install the neuron package using
then when runing ModuleNotFoundError' goes away but I do not get the Iconify window with the graph, and even worse, if I try now
I get back the usual message in the terminal
but the Neuron gui bar does not appear.
If I remove the package
now nrngui works normally again
Any ideas?
Thanks
I can also run python code with
Code: Select all
nrniv -python foo.py
Code: Select all
from neuron import h, gui
import math
# Create the graph
g = h.Graph()
# specify coordinate system for the canvas drawing area
# numbers are: xmin, xmax, ymin, ymax respectively
g.size(0, 10, -1, 1)
# the next g.line command will move the drawing pen to the
# indicated point without drawing anything
g.beginline()
# define a sine wave, 0 <= x <= 10
for i in range(101):
x = i * 0.1
g.line(x, math.sin(x))
# actually draw the plot on the graph in the window
g.flush()
However if I try
Code: Select all
python foo.py
On the other hand, if I install the neuron package using
Code: Select all
$ conda install -c conda-forge neuron
Code: Select all
$ python foo.py
Code: Select all
$ nrngui
Code: Select all
NEURON -- VERSION 7.6.2-3-g9f36b13 master (9f36b13) 2018-08-28
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2018
See http://neuron.yale.edu/neuron/credits
oc>
If I remove the package
Code: Select all
conda remove -c conda-forge neuron
Any ideas?
Thanks