python neuron install to import neuron on python IDLE

Post Reply
figoyouwei
Posts: 41
Joined: Sun Aug 08, 2010 11:09 am

python neuron install to import neuron on python IDLE

Post by figoyouwei »

Hallo viewers :

I had problems by import neuron on Python Shell, with the help of hines,
The following works by my MacBook Pro Version 10.6.4 , Processor :2.26 GHz Intel Core 2 Duo

*************************************
1. Install iv
$ sh build.sh
$ ./configure --prefix=/Applications/nrn71/iv --host=i386-apple-darwin10 --build=i386-apple-darwin10 CFLAGS='-arch i386' CXXFLAGS='-arch i386'

2. Install nrn
$ sh build.sh
$ ./configure --prefix=/Applications/nrn71/nrn --with-nrnpython --with-paranrn --host=i386-apple-darwin10 --build=i386-apple-darwin10 CFLAGS='-arch i386' CXXFLAGS='-arch i386' PYLIB=-lpython PYLIBLINK=-lpython

3. add NEURON bin directory to PATH
export PATH=/Applications/nrn71/nrn/i386/bin:$PATH

4. install python
$ cd $HOME/neuron/nrn-7.1/src/nrnpython
$ python setup.py install
(edit setup.py according to make sys_exec = nrnpython_exec)

To open nrniv:
$ cd /Applications/nrn71/nrn/i386/bin (add it to PATH)
$ nrniv -python
$ import neuron
$ help(neuron)
(export PATH=/Applications/nrn71/nrn/i386/bin:$PATH)

It works by Python Shell,open IDLE
>>> import neuron (bing !!!!!!!)
Post Reply