Search found 52 matches

by bhalterm
Fri Mar 02, 2012 8:09 am
Forum: NEURON + Python
Topic: How to access i_cap from Python
Replies: 2
Views: 1467

Re: How to access i_cap from Python

I'm building from source, so I'm all set. Thanks!
by bhalterm
Thu Mar 01, 2012 5:21 pm
Forum: NEURON + Python
Topic: How to access i_cap from Python
Replies: 2
Views: 1467

How to access i_cap from Python

How do I get access to the i_cap variable from the Python interpreter?

I tried

Code: Select all

hoc.secname.i_cap
and

Code: Select all

hoc.secname(0.5).i_cap
but neither work. The equivalent statements with "cm" work fine.
by bhalterm
Thu Nov 03, 2011 9:11 pm
Forum: NEURON + Python
Topic: Can't import scipy when using nrngui -python
Replies: 3
Views: 2082

Re: Can't import scipy when using nrngui -python

Thanks!!! The following works: ./configure --prefix=$IDIR/nrn --with-iv=$IDIR/iv --with-nrnpython=$ENTHOUGHT_HOME/bin/python PYLIB="-L$ENTHOUGHT_HOME/lib -lpython2.7" PYLIBLINK="-L$ENTHOUGHT_HOME/lib -lpython2.7" PYINCDIR="$ENTHOUGHT_HOME/include/python2.7" PYLIBDIR="$ENTHOUGHT_HOME/lib" --build=x86...
by bhalterm
Thu Nov 03, 2011 12:24 am
Forum: NEURON + Python
Topic: Can't import scipy when using nrngui -python
Replies: 3
Views: 2082

Re: Can't import scipy when using nrngui -python

Ok... It looks like NEURON is using the preinstalled python instead of the enthought python distribution. I am compiling with ./configure --prefix=$IDIR/nrn --with-iv=$IDIR/iv --with-nrnpython PYLIB='-framework Python' PYLIBLINK='-framework Python' --build=x86_64-apple-darwin11.2.0 --with-paranrn Sh...
by bhalterm
Wed Nov 02, 2011 9:19 pm
Forum: NEURON + Python
Topic: Getting gui to stay open when importing NEURON
Replies: 4
Views: 1948

Re: Getting gui to stay open when importing NEURON

The menu bar appears, but the problem is that python exits at the end of the script instead of remaining open for user interaction.

Thanks for the fast response!
by bhalterm
Wed Nov 02, 2011 4:28 pm
Forum: NEURON + Python
Topic: Can't import scipy when using nrngui -python
Replies: 3
Views: 2082

Can't import scipy when using nrngui -python

I'm trying to use Enthought's python distribution to have scipy accessible when using NEURON. I am compiling NEURON from the latest source checked out with mercurial. When I use the command nrngui -python I can import numpy, but not scipy (it says the module does not exist). When using just python, ...
by bhalterm
Wed Nov 02, 2011 4:22 pm
Forum: NEURON + Python
Topic: Getting gui to stay open when importing NEURON
Replies: 4
Views: 1948

Getting gui to stay open when importing NEURON

Is there a way to keep the gui open for user interaction when importing neuron in a python script using

Code: Select all

import neuron
from neuron import gui
similar to how it stays open when using nrngui -python?
by bhalterm
Wed Jul 06, 2011 7:19 pm
Forum: OS X
Topic: NEURON 7.2 alpha doesn't compile with python and open mpi
Replies: 26
Views: 8485

Re: NEURON 7.2 alpha doesn't compile with python and open mpi

I think I did it! I found http://www.open-mpi.org/faq/?category=mpi-apps#override-wrappers-after-v1.0 and removed -lutil from the file mpic++-wrapper-data.txt now I can import neuron: Python 2.7.1 (r271:86882M, Nov 30 2010, 09:39:13) [GCC 4.0.1 (Apple Inc. build 5494)] on darwin Type "help", "copyri...
by bhalterm
Wed Jul 06, 2011 6:55 pm
Forum: OS X
Topic: NEURON 7.2 alpha doesn't compile with python and open mpi
Replies: 26
Views: 8485

Re: NEURON 7.2 alpha doesn't compile with python and open mpi

running env ARCHFLAGS='-arch i386' python setup.py install gives output: running install running build running build_py creating build/lib.macosx-10.3-i386-2.7 creating build/lib.macosx-10.3-i386-2.7/neuron copying /Applications/NEURON-7.2-test/nrn/share/nrn/lib/python/neuron/__init__.py -> build/li...
by bhalterm
Wed Jul 06, 2011 6:52 pm
Forum: OS X
Topic: NEURON 7.2 alpha doesn't compile with python and open mpi
Replies: 26
Views: 8485

Re: NEURON 7.2 alpha doesn't compile with python and open mpi

before removing -arch ppc: LDCXXSHARED : c++ -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup BLDSHARED : gcc-4.0 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -isysroot /Developer/SDKs/MacO...
by bhalterm
Wed Jul 06, 2011 3:39 pm
Forum: OS X
Topic: NEURON 7.2 alpha doesn't compile with python and open mpi
Replies: 26
Views: 8485

Re: NEURON 7.2 alpha doesn't compile with python and open mpi

so once you have the variables from sysconfig.get_config_vars(), how do you actually override them with the new values? presumably sysconfig.get_config_vars() is returning a copy of the variable dictionary? edit: I wrote a little script to see if I could edit the dictionary returned by sysconfig.get...
by bhalterm
Wed Jul 06, 2011 3:16 pm
Forum: OS X
Topic: NEURON 7.2 alpha doesn't compile with python and open mpi
Replies: 26
Views: 8485

Re: NEURON 7.2 alpha doesn't compile with python and open mpi

Where would that go? in setup.py? import sysconfig import re new_config_vars = {} for k, v in sysconfig.get_config_vars().items(): if type(v) is str and '-arch ppc' in v: new_config_vars[k] = v.replace('-arch ppc', '').replace(' ', ' ') for k, v in new_config_vars.items(): print k + ' : ' + v Is thi...
by bhalterm
Wed Jul 06, 2011 1:51 pm
Forum: OS X
Topic: NEURON 7.2 alpha doesn't compile with python and open mpi
Replies: 26
Views: 8485

Re: NEURON 7.2 alpha doesn't compile with python and open mpi

Notice that NEURON-7.2 guesses i386, others guess i686: Macintosh-4% cd ~/NEURON/iv-17 Macintosh-4% ./config.guess i686-apple-darwin9.8.0 Macintosh-4% cd ../nrn-7.1 Macintosh-4% ./config.guess i686-apple-darwin9.8.0 Macintosh-4% cd ../nrn-7.2 Macintosh-4% ./config.guess i386-apple-darwin9.8.0 Config...
by bhalterm
Wed Jul 06, 2011 1:33 am
Forum: OS X
Topic: NEURON 7.2 alpha doesn't compile with python and open mpi
Replies: 26
Views: 8485

Re: NEURON 7.2 alpha doesn't compile with python and open mpi

ok... I think one problem was that I set DYLD_LIBRARY_PATH to open mpi's library, and I wasn't supposed to. that fixed the nrn_load_dll not available problem. setup.py still gives the error: ldld: library not found for -lutil : library not found for -lutil collect2: ld returned 1 exit status collect...