First-time setup

Post Reply
toll_booth

First-time setup

Post by toll_booth »

Hello all, I am trying to install and use the NEURON environment in Windows 8. I would like to be able to use it in Python.

I tried reading here: http://www.neuron.yale.edu/neuron/node/47 but I could not figure most of it out. :( I am just not that skilled with installing anything more complicated than a download-and-double-click installation. Could someone list the exact, step-by-step procedures I need to take to get NEURON up and running, or link me to a page that does that?
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: First-time setup

Post by ted »

Just get the 64 bit cygwin installer from http://www.neuron.yale.edu/neuron/download.
After you install NEURON, look in the NEURON Program Group (in the start menu), or in the NEURON folder on your desktop, for an icon that will start NEURON with Python as the interpreter. If instead you want to use NEURON as a module under Python, follow the instructions under the heading
Compiling the standard distribution from source code
which you will find a bit farther down the page.
toll_booth

Re: First-time setup

Post by toll_booth »

Alright. I am now able to bring this up:

Image

Am I on the right track? If so, what documentation/beginner's guide should I read next? EDIT: Never mind, I see I need to get The NEURON Book or its corresponding paper.
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: First-time setup

Post by ted »

You'll also want to read the papers about NEURON + Python -- see http://www.neuron.yale.edu/neuron/nrnpubs -- and spend some time perusing the Programmer's Reference, especially http://www.neuron.yale.edu/neuron/stati ... index.html. Or, if you can, sign up for the "NEURON Fundamentals" component of the NEURON Summer Course http://www.neuron.yale.edu/neuron/stati ... d2014.html and save yourself weeks to months of stubbing your toes.
toll_booth

Re: First-time setup

Post by toll_booth »

http://www.neuron.yale.edu/neuron/stati ... ython.html

These installation instructions are very confusing to me. I do not know where I am supposed to type this stuff, let alone what I am actually supposed to type.
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: First-time setup

Post by ted »

If you have already installed NEURON and can use Python from it, why would you need to compile it from source code?
toll_booth

Re: First-time setup

Post by toll_booth »

ted wrote:If you have already installed NEURON and can use Python from it, why would you need to compile it from source code?
I guess my question would be where I can go to edit and run scripts. Ideally I'd like to be able to run this on Spyder, which I have already installed.
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: First-time setup

Post by ted »

toll_booth wrote:I guess my question would be where I can go to edit and run scripts.
Anywhere you like, as long as the result is a plain text file. Save it to disk. If it's a hoc file and you're using MSWin, double click on it and NEURON will start and read the file. If it's a .py file, you probably need to launch it from an rxvt terminal with a command line of the form
nrniv -python filename.py
or maybe
nrngui -python filename.py
Ideally I'd like to be able to run this on Spyder, which I have already installed.
Then you'll have to figure out how to make Spyder execute one of those command lines.
toll_booth

Re: First-time setup

Post by toll_booth »

ted wrote:
toll_booth wrote:I guess my question would be where I can go to edit and run scripts.
Anywhere you like, as long as the result is a plain text file. Save it to disk. If it's a hoc file and you're using MSWin, double click on it and NEURON will start and read the file. If it's a .py file, you probably need to launch it from an rxvt terminal with a command line of the form
nrniv -python filename.py
or maybe
nrngui -python filename.py
But see, all of that is what I have NO CLUE how to do. None. Like, I don't even know where to begin. :( Are you saying I need to:

1. Create some kind of file (in what language?) and save it as a .txt file, not a .c, .py, etc. file?
2. Somehow declare it as a hoc file?
3. If it's Python, go get an rxvt terminal?
4. Then run said file with certain command lines?
Ideally I'd like to be able to run this on Spyder, which I have already installed.
Then you'll have to figure out how to make Spyder execute one of those command lines.
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: First-time setup

Post by ted »

I can only provide advice based on what I know or can reasonably surmise, and I freely admit ignorance of how to use Spyder. Maybe someone who uses Spyder can help you with getting it to use NEURON to execute code.
toll_booth wrote:
ted wrote:
toll_booth wrote:I guess my question would be where I can go to edit and run scripts.
Anywhere you like, as long as the result is a plain text file. Save it to disk. If it's a hoc file and you're using MSWin, double click on it and NEURON will start and read the file. If it's a .py file, you probably need to launch it from an rxvt terminal with a command line of the form
nrniv -python filename.py
or maybe
nrngui -python filename.py
But see, all of that is what I have NO CLUE how to do.
If you're using MSWindows, you'll find an "rxvt" item in the NEURON Program Group that will start an rxvt terminal. An rxvt terminal looks like a standard UNIX/Linux/BSD terminal, and offers typical commands such as
pwd
cd
ls
for viewing paths, changing directories, and viewing directory contents. Information about those is all over the place, including introductory books on UNIX or Linux and dozens if not thousands of web sites. Ditto for answers to basic questions like "how to use a text editor to create a file" and "how to execute commands from the command line."
toll_booth

Re: First-time setup

Post by toll_booth »

Okay. I got to here:

Image

Now I presume I want to go http://www.neuron.yale.edu/neuron/stati ... stallation here to install this with Python. Question, what do I do with the "..."? The directory to install to or something? If so, how do I write it--can you give me an example?

Sorry, as I said, I'm a noob here :(
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: First-time setup

Post by ted »

If you installed NEURON under MSWin, you already have a NEURON Program Group that contains a "NEURON + Python" item. Double click on that to start NEURON with Python as its interpreter. Read this article for whatever else you might glean:
Hines, M.L., Davison, A.P. and Muller, E. NEURON and Python. Frontiers in Neuroinformatics 3:10.3389/neuro.11.001.2009, 2009.
(available from a link at http://www.neuron.yale.edu/neuron/nrnpubs)
toll_booth

Re: First-time setup

Post by toll_booth »

ted wrote:If you installed NEURON under MSWin, you already have a NEURON Program Group that contains a "NEURON + Python" item. Double click on that to start NEURON with Python as its interpreter. Read this article for whatever else you might glean:
Hines, M.L., Davison, A.P. and Muller, E. NEURON and Python. Frontiers in Neuroinformatics 3:10.3389/neuro.11.001.2009, 2009.
(available from a link at http://www.neuron.yale.edu/neuron/nrnpubs)
Grr, I tried this link: http://journal.frontiersin.org/Journal/ ... 9/abstract

But it doesn't work. And BTW I just found the FAQ, and hopefully it might be able to answer some of the questions that I've had...maybe!
Post Reply