Question about using python as interpreter

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

Post Reply
maxwellphenderson
Posts: 22
Joined: Mon Mar 07, 2011 12:17 am

Question about using python as interpreter

Post by maxwellphenderson »

So, I am new to NEURON and have been excitedly playing with the tools outlined in some of the various NEURON tutorials. I have run into an issue though that I am having a bit of trouble with. I would like to use python as an interpreter instead of hoc. I found a tutorial about how to do this using bash by Andrew Davison, but I guess some of my command line skills are not so good. I have already installed NEURON-7.1 and am running on Mac OSX. Is there any chance anyone can explain to me from this point how to launch NEURON using python as interpreter? I have tried nrniv -python, nrngui.app -python, and other such statements to no avail. So far, the only way I know how to launch the program is by double clicking the icon. Sorry if this is a very stupid question, but thanks ahead for the help!
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Question about using python as interpreter

Post by ted »

First you have to compile NEURON from source code using the --with-python configure switch. Given the improvements that have been made since the official release of 7.1, it would be advisable to download at least the most recent 7.2 alpha source code, if not get the very latest development code from the mercurial repository. See http://www.neuron.yale.edu/neuron/download
maxwellphenderson
Posts: 22
Joined: Mon Mar 07, 2011 12:17 am

Re: Question about using python as interpreter

Post by maxwellphenderson »

Thanks!
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Question about using python as interpreter

Post by ted »

MSWin users get a bit of a free ride--Python is compiled into the NEURON installer. UNIX/Linux/OS X users have to compile from source, but they have the option of choosing what version of Python they like. MSWin users who want to compile from source must first install Cygwin.
Post Reply