Problem importing NEURON in python

Post Reply
Posts: 1
Joined: Thu Oct 10, 2019 6:01 am

Problem importing NEURON in python

Post by hadas.manor »


I am trying to install NEURON on my max OSX (10.11), and am running into problems importing neuron in python. Python doesn't recognize the neuron module.

Also when I try to compile mod files ("nrnivmodl mods") I get the error "-bash: nrnivmodl: command not found". I have installed CommandLineTools but this didn't help.

When I run the line: "/Applications/NEURON-7.7/nrn/x86_64/bin/nrniv -nopython" it is successful- opens neurondemo.

Thanks for your Help!

Posts: 214
Joined: Fri Nov 28, 2008 3:38 pm
Location: Yale School of Public Health

Re: Problem importing NEURON in python

Post by ramcdougal »

Sounds like the PATH and PYTHONPATH environment variables didn't get set correctly somehow.

Please try reinstalling to see if this fixes the problem. During installation, it should prompt you for permission to let it modify your paths. Be sure to agree to this. Changes won't be effective in existing terminals, but will work in new terminals.

If this doesn't work, can you check your ~/.bash_profile and ~/.bashrc for any mention of nrn or NEURON, and let us know how that goes. (I'm assuming you're using bash?)

Posts: 2
Joined: Fri Apr 27, 2018 11:33 pm

Re: Problem importing NEURON in python

Post by shhschen »


How does it work eventually? My friend has the same problem now, and I cannot help him since I don't know much about mac.


Post Reply