New installation of NEURON + Python

Post Reply
bril27
Posts: 8
Joined: Sun Mar 20, 2022 4:08 am

New installation of NEURON + Python

Post by bril27 »

Hello everyone!

This is the first time I will be installing NEURON with Python and I need help. Perhaps a step-by-step guide?
I am on Windows 10 Pro 64bit and would like to use Python 3.11 in Anaconda3 with the latest NEURON version 8.2.
Do I need to install Interviews? What is the procedure using a CMD prompt?

Thank you in advance for your help!
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: New installation of NEURON + Python

Post by ted »

Two steps.

Install Python.
Then install NEURON by following the instructions at nrn.readthedocs.io

If all you want to do is install, you're done.

To verify that NEURON is working, open the NEURON program group and double click on bash. That will open a terminal. In that terminal, execute the command
neurondemo

That should spawn a bunch of panels ("windows") arranged vertically. From top to bottom they are
NEURON Demonstrations
Temperature
RunControl
VariableTimeStep
And to the left of the NEURON Demonstrations panel you will see the
NEURON Main Menu
toolbar.

In the NEURON Demonstrations panel click on the radio button next to "Release".

More windows will appear.
In the RunControl panel click on "Init & Run". The graphs to the right will now show the time courses of several variables.

To exit NEURON, in the NEURON Main Menu panel click on
File / Quit

To verify that Anaconda's Python is able to use NEURON as a module, start Anaconda Prompt. This will open a new window.

At the system prompt execute
python

At the python prompt (i.e. >>>) execute
from neuron import h, gui

The NEURON Main Menu toolbar should appear. This means that python is able to use NEURON as a module.
bril27
Posts: 8
Joined: Sun Mar 20, 2022 4:08 am

Re: New installation of NEURON + Python

Post by bril27 »

Thank you, Ted! Everything's good.
malihaahmed
Posts: 6
Joined: Thu Nov 05, 2020 8:01 pm

Re: New installation of NEURON + Python

Post by malihaahmed »

I've noticed the installer from https://www.neuron.yale.edu/neuron/download is version 8.2.0, and it kept giving one of my students a "no module named hoc" error. They eventually used the installer found on nrn.readthedocs.io and it is version 8.2.3 and this works fine.

Just thought I should share this in case anyone else is having issues with the installation.
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: New installation of NEURON + Python

Post by ted »

I've noticed the installer from https://www.neuron.yale.edu/neuron/download is version 8.2.0, and it kept giving one of my students a "no module named hoc" error. They eventually used the installer found on nrn.readthedocs.io and it is version 8.2.3 and this works fine.

Just thought I should share this in case anyone else is having issues with the installation.
Thanks for that. I just now (10 minutes after your post) went to https://www.neuron.yale.edu/neuron/download, and that took me straight to nrn.readthedocs.io where the version to be downloaded is 8.2.3. That might be the quickest response to user feedback I've ever seen.
Post Reply