Page 1 of 1
Can't import scipy when using nrngui -python
Posted: Wed Nov 02, 2011 4:28 pm
by bhalterm
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
I can import numpy, but not scipy (it says the module does not exist). When using just python, I am able to import scipy.
Also, what is the --with-numpy configure flag? I didn't use that.
Thanks!
P.S. This is in osx lion.
Re: Can't import scipy when using nrngui -python
Posted: Thu Nov 03, 2011 12:24 am
by bhalterm
Ok... It looks like NEURON is using the preinstalled python instead of the enthought python distribution. I am compiling with
Code: Select all
./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
Should '-framework Python' still work to find the enthought distribution?
Re: Can't import scipy when using nrngui -python
Posted: Thu Nov 03, 2011 4:45 pm
by hines
From a terminal, how do you launch the Enthought version of Python? If you are lucky, all you would need is
--with-nrnpython=/where/you/find/python
If you are unlucky you need to specify four variables analogous to:
PYINCDIR="$BG_BASE/gnu-linux/include/python2.6"
PYLIB="-L$BG_BASE/gnu-linux/lib -lpython2.6"
PYLIBDIR="$BG_BASE/gnu-linux/lib"
PYLIBLINK="-L$BG_BASE/gnu-linux/lib -lpython2.6"
Re: Can't import scipy when using nrngui -python
Posted: Thu Nov 03, 2011 9:11 pm
by bhalterm
Thanks!!! The following works:
Code: Select all
./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_64-apple-darwin11.2.0 --with-paranrn
Where $ENTHOUGHT_HOME is
Code: Select all
/Library/Frameworks/EPD64.framework/Versions/Current