Neuron with Enthought Python on Snow Leopard

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

Moderator: hines

Post Reply
mctavish
Posts: 74
Joined: Tue Mar 14, 2006 6:10 pm
Location: New Haven, CT

Neuron with Enthought Python on Snow Leopard

Post by mctavish »

I have been working with installing NEURON under Enthought Python Distributions. Here is a general recipe for a 32-bit compile:

Code: Select all

IDIR=${HOME}/neuron
IVDIR=iv_epd32
NRNDIR=nrn_epd32
hg clone http://www.neuron.yale.edu/hg/neuron/iv $IVDIR
hg clone http://www.neuron.yale.edu/hg/neuron/nrn $NRNDIR
cd $IVDIR
./build.sh
./configure --prefix=$IDIR/$IVDIR CFLAGS='-arch i386' CXXFLAGS='-arch i386'
make -j 2
make install
cd ..
cd $NRNDIR
./build.sh
./configure PYLIBLINK='-framework Python' PYLIB='-framework Python' CFLAGS='-arch i386' CXXFLAGS='-arch i386' --prefix=$IDIR/$NRNDIR --with-iv=$IDIR/$IVDIR --with-nrnpython 
make -j 2
make install
cd src/nrnpython
sudo python setup.py install
This assumes that the 32-bit Enthought Python Distribution (EPD) is the "default python". The "make -j 2" line is to use both cores on my MacBook Pro. If you have more cores, try "make -j 8".

If you want to compile 64-bit versions, switch the default python to a 64-bit EPD and then:

Code: Select all

IDIR=${HOME}/neuron
IVDIR=iv_epd64
NRNDIR=nrn_epd64
hg clone http://www.neuron.yale.edu/hg/neuron/iv $IVDIR
hg clone http://www.neuron.yale.edu/hg/neuron/nrn $NRNDIR
cd $IVDIR
./build.sh
./configure --prefix=$IDIR/$IVDIR
make -j 2
make install
cd ..
cd $NRNDIR
./build.sh
./configure PYLIBLINK='-framework Python' PYLIB='-framework Python' --prefix=$IDIR/$NRNDIR --with-iv=$IDIR/$IVDIR --with-nrnpython 
make -j 2
make install
cd src/nrnpython
sudo python setup.py install
You may want to alter your nrnenv file accordingly.

As attractive as going 64-bit sounds, I have not yet been able to get Mayavi2 (and vtk) going. For 3D visualization with Mayavi2, I'm sticking with 32-bit for now.

These scripts are also similar to those found at http://tfoutz99.github.com/Neuron3D/May ... n-Mac.html.
Post Reply