Errors importing neuron

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

Moderator: hines

bll5z6
Posts: 27
Joined: Thu May 26, 2016 10:27 am

Errors importing neuron

Post by bll5z6 » Tue Feb 26, 2019 3:43 pm

Hi all,

I have installed NEURON + Python on many different systems but for some reason am hitting a wall while trying to do "import neuron" on the Comet supercomputer (CentOS 6.10). I followed the instructions at https://neuron.yale.edu/neuron/download/compile_linux and am downloading NEURON 7.6.5. Default Python on the system is 2.6.6.

I can run "nrniv" and "nrniv -python" without a problem but I cannot run python and then "import neuron".

In the installation process, I did this step:

Code: Select all

python setup.py install --prefix=$HOME/local
which installed two folders in $HOME/local. One is called "lib", the other is called "lib64".

"lib/python2.6/site-packages/neuron" has no contents except help_data.dat so if I set my PYTHONPATH to this and attempt to import neuron, I get the classic error "no module named neuron".

"lib64/python2.6/site-packages/neuron" has some contents so I set my PYTHONPATH to this. However, when I run python and "import neuron" or "from neuron import h" I get a single line that says "Segmentation fault".

Any ideas? Thanks in advance!

Ben

hines
Site Admin
Posts: 1580
Joined: Wed May 18, 2005 3:32 pm

Re: Errors importing neuron

Post by hines » Thu Feb 28, 2019 12:06 pm

which installed two folders in $HOME/local
That is because a default build and make install installs the neuron module by default in <prefix>/lib/python . This can be turned off with
the configure option --disable-pysetup
Alternatively, you can avoid the manual execution of setup.py with the configure option

Code: Select all

 --enable-pysetup=installoption
                          Execute '$(PYTHON) setup.py install installoption'
                          as the last installation step. --disable-pysetup or
                          an installoption of 'no' means do NOT execute
                          '$(PYTHON) setup.py...' The default installoption is
                          '--home=<prefix>'
Launching python it is possible to use mpi for the neuron module with
from mpi4py import MPI
or else have the environment variable
export NEURON_INIT_MPI=1
or else
from neuron import h
h.nrnmpi_init()
This last requires the latest github version of nrn and is a noop if mpi is already initialized for neuron. So it is ok even if the import of
mpi4py succeeds or fails (in a try: statement).

hines
Site Admin
Posts: 1580
Joined: Wed May 18, 2005 3:32 pm

Re: Errors importing neuron

Post by hines » Thu Feb 28, 2019 12:06 pm

which installed two folders in $HOME/local
That is because a default build and make install installs the neuron module by default in <prefix>/lib/python . This can be turned off with
the configure option --disable-pysetup
Alternatively, you can avoid the manual execution of setup.py with the configure option

Code: Select all

 --enable-pysetup=installoption
                          Execute '$(PYTHON) setup.py install installoption'
                          as the last installation step. --disable-pysetup or
                          an installoption of 'no' means do NOT execute
                          '$(PYTHON) setup.py...' The default installoption is
                          '--home=<prefix>'
Launching python it is possible to use mpi for the neuron module with
from mpi4py import MPI
or else have the environment variable
export NEURON_INIT_MPI=1
or else
from neuron import h
h.nrnmpi_init()
This last requires the latest github version of nrn and is a noop if mpi is already initialized for neuron. So it is ok even if the import of
mpi4py succeeds or fails (in a try: statement).

bll5z6
Posts: 27
Joined: Thu May 26, 2016 10:27 am

Re: Errors importing neuron

Post by bll5z6 » Fri Mar 01, 2019 3:27 pm

Thanks Michael. I tried your suggestions but still face the same issue. Here are the commands I used for installation:

Code: Select all


wget https://neuron.yale.edu/ftp/neuron/versions/v7.6/7.6.5/nrn-7.6.5.tar.gz
tar xzf nrn-7.6.5.tar.gz
rm nrn-7.6.5.tar.gz
mv nrn-7.6 nrn

cd nrn
./configure --prefix=`pwd` --without-iv --with-nrnpython=/usr/bin/python --with-paranrn --enable-pysetup='--prefix=$HOME/local'
make
make install

echo 'export N=$HOME/utils/nrn' >> $HOME/utils/nrnenv
echo 'export CPU=x86_64' >> $HOME/utils/nrnenv
echo 'export PATH="$N/$CPU/bin:$PATH"' >> $HOME/utils/nrnenv

source $HOME/utils/nrnenv

At this point, I need to decide where to point PYTHONPATH so I look in the folder '$HOME/local/lib/python2.6/site-packages/neuron'. There is but one file 'help_data.dat'. However, in '$HOME/local/lib64/python2.6/site-packages/neuron' , there are all the normal files. I set my PYTHONPATH here, then launch python, do "import neuron" and get "Segmentation fault".

hines
Site Admin
Posts: 1580
Joined: Wed May 18, 2005 3:32 pm

Re: Errors importing neuron

Post by hines » Fri Mar 01, 2019 5:05 pm

The PYTHONPATH should be
export PYTHONPATH=$HOME/local/lib64/python2.6/site-packages.
But are you sure the $HOME got expanded and there is not a OME folder in nrn/src/nrnpython
The latter is what happened to me on my desktop with I used your configure options and I needed

Code: Select all

hines@hines-T7500:~/neuron/nrntmp$ export PYTHONPATH=$HOME/neuron/nrntmp/src/nrnpython/OME/local/lib/python2.7/site-packages
hines@hines-T7500:~/neuron/nrntmp$ python
Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15) 
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from neuron import h
>>> 
Apparently on my machine the $H eventually got expanded to nothing.
Best not to put macros inside single quotes. Another difference is that I don't have python2.6 installed on my desktop. I can try that if the problem
persists. A good source of
segmentation violations is when the neuron module imported comes from an incompatible version of NEURON. Probably best to clean out all
the neuron modules and rnn folders and start again from the tar.gz file.

hines
Site Admin
Posts: 1580
Joined: Wed May 18, 2005 3:32 pm

Re: Errors importing neuron

Post by hines » Sat Mar 02, 2019 12:24 pm

I have obtained a guest account for comet and will be able to login on Monday to see if I can resolve your issue. I have been told that the
proper python to use is python 2.7.10 which is activated by
module load python

bll5z6
Posts: 27
Joined: Thu May 26, 2016 10:27 am

Re: Errors importing neuron

Post by bll5z6 » Tue Mar 05, 2019 3:44 pm

Using Python 2.7 (module load python) seems to have fixed the issue. Now I don't need to use any extra configuration parameters. Here are the installation commands for (mostly my own) future reference:

Code: Select all

module load python

mkdir utils
cd utils

wget https://neuron.yale.edu/ftp/neuron/versions/v7.6/7.6.5/nrn-7.6.5.tar.gz
tar xzf nrn-7.6.5.tar.gz
rm nrn-7.6.5.tar.gz
mv nrn-7.6 nrn

cd nrn
./configure --prefix=`pwd` --without-iv --with-nrnpython=`which python` --with-paranrn 
make
make install

export PATH="$HOME/utils/nrn/x86_64/bin:$PATH"
export PYTHONPATH=$HOME/utils/nrn/lib/python

To enable these environment variables when you log in, you should add the last two lines to your ~/.bashrc file. I also added module load python to my .bashrc file so I don't have to remember to load it each time.

hines
Site Admin
Posts: 1580
Joined: Wed May 18, 2005 3:32 pm

Re: Errors importing neuron

Post by hines » Tue Mar 05, 2019 3:52 pm

Good. I'm glad that is resolved. In my own attempt on comet I first used the configure option --with-nrnpython
which ended up building against Python 3.5.0 (default, Feb 1 2016, 14:14:54) so, of course, I had to start over with
--with-nrnpython=python

bll5z6
Posts: 27
Joined: Thu May 26, 2016 10:27 am

Re: Errors importing neuron

Post by bll5z6 » Tue Mar 05, 2019 5:13 pm

As I progressed I realized it would be easier to just download Anaconda 2.7 to my home directory and use this as my python distribution since it automatically installs other packages I need. So I deleted everything and installed Anaconda 2.7 (https://repo.anaconda.com/archive/Anaco ... -x86_64.sh). Then, using the same install commands as my previous comment (without module load python, of course), I installed NEURON. Now I get this:

Code: Select all

$ python
Python 2.7.15 |Anaconda, Inc.| (default, Dec 14 2018, 19:04:19) 
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from neuron import h
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/latimerb/local/lib/python2.7/site-packages/neuron/__init__.py", line 112, in <module>
    exec("import neuron.hoc%d%d as hoc" % (sys.version_info[0], sys.version_info[1]))
  File "<string>", line 1, in <module>
ImportError: No module named hoc27
Any idea why?

hines
Site Admin
Posts: 1580
Joined: Wed May 18, 2005 3:32 pm

Re: Errors importing neuron

Post by hines » Tue Mar 05, 2019 5:56 pm

What is the name of the *.so file in <prefix>lib/python/neuron
When i installed on comet with "module load python" it turned out to be hoc.so . However python3 builds a name like
hoc.cpython-35m-x86_64-linux-gnu.so
Also what was your configure line? It seems quite strange that the path to the neuron module is
/home/latimerb/local/lib/python2.7/site-packages/neuron

bll5z6
Posts: 27
Joined: Thu May 26, 2016 10:27 am

Re: Errors importing neuron

Post by bll5z6 » Tue Mar 05, 2019 6:05 pm

The file in <prefix>lib/python/neuron is called hoc.so.

Sorry, I pasted the wrong error using a different configuration. This is the error when I do the config like this:

Code: Select all

$ ./configure --prefix=`pwd` --without-iv --with-nrnpython=`which python` --with-paranrn 
$ make
$ make install
$ export PYTHONPATH=$HOME/utils/nrn/lib/python
$ python
Python 2.7.15 |Anaconda, Inc.| (default, Dec 14 2018, 19:04:19) 
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from neuron import h
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/latimerb/utils/nrn/lib/python/neuron/__init__.py", line 112, in <module>
    exec("import neuron.hoc%d%d as hoc" % (sys.version_info[0], sys.version_info[1]))
  File "<string>", line 1, in <module>
ImportError: No module named hoc27


hines
Site Admin
Posts: 1580
Joined: Wed May 18, 2005 3:32 pm

Re: Errors importing neuron

Post by hines » Tue Mar 05, 2019 6:15 pm

Ok. Then i'd like to know the name of the .so file in
/home/latimerb/utils/nrn/lib/python/neuron/
and are you sure that 'which python' is anaconda?
Ie what is the value of NRNPYTHON_LIBS in config.status
When you ran configure, I presume `pwd` was
/home/latimerb/utils/nrn

bll5z6
Posts: 27
Joined: Thu May 26, 2016 10:27 am

Re: Errors importing neuron

Post by bll5z6 » Tue Mar 05, 2019 6:29 pm

The .so file in /home/latimerb/utils/nrn/lib/python/neuron/ is hoc.so.

Yes, which python is anaconda and yes pwd was /home/latimerb/utils/nrn

Code: Select all

$ which python
~/anaconda2/bin/python

In config.status, it says:

Code: Select all

S["NRNPYTHON_LIBS"]="-lnrnpython -L/home/latimerb/anaconda2/lib -lpython2.7 -lpthread -ldl -lutil -R/home/latimerb/anaconda2/lib

hines
Site Admin
Posts: 1580
Joined: Wed May 18, 2005 3:32 pm

Re: Errors importing neuron

Post by hines » Tue Mar 05, 2019 8:15 pm

I believe the neuron module did in fact try to import hoc.so and it failed, thus falling back to try hoc27.so which does not exist. So the
next step in the diagnostic process is to determine the hidden error that prevented hoc.so from importing. Is your anaconda installation
available for use by others? ie. proper permissions so I can build against it. Also it may be helpful to see the result of
ldd /home/latimerb/utils/nrn/lib/python/neuron/hoc.so to see if any subsidiary shared libraries are not found.
Also is there any clear indication of what is going wrong when...
python -v
import neuron

bll5z6
Posts: 27
Joined: Thu May 26, 2016 10:27 am

Re: Errors importing neuron

Post by bll5z6 » Wed Mar 06, 2019 10:17 am

I don't think the Anaconda installation is available to others, it is just in my home directory. It is the install available here (I just accepted all the defaults):

Code: Select all

wget https://repo.anaconda.com/archive/Anaconda2-2018.12-Linux-x86_64.sh
bash Anaconda2-2018.12-Linux-x86_64.sh 
Here's this:

Code: Select all

$ ldd /home/latimerb/utils/nrn/lib/python/neuron/hoc.so
	linux-vdso.so.1 =>  (0x00007fffb81fc000)
	libnrnpython.so.0 => /home/latimerb/utils/nrn/x86_64/lib/libnrnpython.so.0 (0x00002ad4ca3c9000)
	libnrnoc.so.0 => /home/latimerb/utils/nrn/x86_64/lib/libnrnoc.so.0 (0x00002ad4ca607000)
	liboc.so.0 => /home/latimerb/utils/nrn/x86_64/lib/liboc.so.0 (0x00002ad4ca891000)
	libnrniv.so.0 => /home/latimerb/utils/nrn/x86_64/lib/libnrniv.so.0 (0x00002ad4caadf000)
	libivoc.so.0 => /home/latimerb/utils/nrn/x86_64/lib/libivoc.so.0 (0x00002ad4cae23000)
	libmemacs.so.0 => /home/latimerb/utils/nrn/x86_64/lib/libmemacs.so.0 (0x00002ad4cb06b000)
	libmeschach.so.0 => /home/latimerb/utils/nrn/x86_64/lib/libmeschach.so.0 (0x00002ad4cb284000)
	libneuron_gnu.so.0 => /home/latimerb/utils/nrn/x86_64/lib/libneuron_gnu.so.0 (0x00002ad4cb4ec000)
	libnrnmpi.so.0 => /home/latimerb/utils/nrn/x86_64/lib/libnrnmpi.so.0 (0x00002ad4cb6fd000)
	libscopmath.so.0 => /home/latimerb/utils/nrn/x86_64/lib/libscopmath.so.0 (0x00002ad4cb907000)
	libsparse13.so.0 => /home/latimerb/utils/nrn/x86_64/lib/libsparse13.so.0 (0x00002ad4cbb53000)
	libsundials.so.0 => /home/latimerb/utils/nrn/x86_64/lib/libsundials.so.0 (0x00002ad4cbd6b000)
	libreadline.so.7 => /home/latimerb/anaconda2/lib/libreadline.so.7 (0x00002ad4cbfbe000)
	libivos.so.0 => /home/latimerb/utils/nrn/x86_64/lib/libivos.so.0 (0x00002ad4cc00f000)
	libpython2.7.so.1.0 => /home/latimerb/anaconda2/lib/libpython2.7.so.1.0 (0x00002ad4cc224000)
	libmpicxx.so.12 => /opt/mvapich2/intel/ib/lib/libmpicxx.so.12 (0x00002ad4cc405000)
	libmpi.so.12 => /opt/mvapich2/intel/ib/lib/libmpi.so.12 (0x00002ad4cc626000)
	libimf.so => /opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64/libimf.so (0x00002ad4cd054000)
	libsvml.so => /opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64/libsvml.so (0x00002ad4cd518000)
	libirng.so => /opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64/libirng.so (0x00002ad4ce113000)
	libm.so.6 => /lib64/libm.so.6 (0x00002ad4ce339000)
	libstdc++.so.6 => /opt/gnu/gcc/lib64/libstdc++.so.6 (0x00002ad4ce5be000)
	libgcc_s.so.1 => /opt/gnu/gcc/lib64/libgcc_s.so.1 (0x00002ad4ce8d0000)
	libintlc.so.5 => /opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64/libintlc.so.5 (0x00002ad4ceae6000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00002ad4ced3d000)
	libc.so.6 => /lib64/libc.so.6 (0x00002ad4cef5a000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00002ad4cf2ee000)
	libcilkrts.so.5 => /opt/gnu/gcc/lib64/libcilkrts.so.5 (0x00002ad4cf4f3000)
	libX11.so.6 => /usr/lib64/libX11.so.6 (0x00002ad4cf70f000)
	libncurses.so.5 => /lib64/libncurses.so.5 (0x00002ad4cfa4d000)
	libtinfow.so.6 => /home/latimerb/anaconda2/lib/./libtinfow.so.6 (0x00002ad4cfc6f000)
	libutil.so.1 => /lib64/libutil.so.1 (0x00002ad4cfcad000)
	libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00002ad4cfeb0000)
	libibmad.so.5 => /usr/lib64/libibmad.so.5 (0x00002ad4d0204000)
	librdmacm.so.1 => /usr/lib64/librdmacm.so.1 (0x00002ad4d0422000)
	libibumad.so.3 => /usr/lib64/libibumad.so.3 (0x00002ad4d063a000)
	libibverbs.so.1 => /usr/lib64/libibverbs.so.1 (0x00002ad4d0843000)
	librt.so.1 => /lib64/librt.so.1 (0x00002ad4d0a5a000)
	liblimic2.so.0 => /opt/mvapich2/intel/ib/lib/liblimic2.so.0 (0x00002ad4d0c62000)
	libifport.so.5 => /opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64/libifport.so.5 (0x00002ad4d0e64000)
	libifcore.so.5 => /opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64/libifcore.so.5 (0x00002ad4d1093000)
	/lib64/ld-linux-x86-64.so.2 (0x0000555d7bab4000)
	libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00002ad4d13d4000)
	libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00002ad4d15f9000)
	libz.so.1 => /lib64/libz.so.1 (0x00002ad4d181a000)
	libnl.so.1 => /lib64/libnl.so.1 (0x00002ad4d1a31000)
	libXau.so.6 => /usr/lib64/libXau.so.6 (0x00002ad4d1c83000)
And this:

Code: Select all

$ python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /home/latimerb/anaconda2/lib/python2.7/site.pyc matches /home/latimerb/anaconda2/lib/python2.7/site.py
import site # precompiled from /home/latimerb/anaconda2/lib/python2.7/site.pyc
# /home/latimerb/anaconda2/lib/python2.7/os.pyc matches /home/latimerb/anaconda2/lib/python2.7/os.py
import os # precompiled from /home/latimerb/anaconda2/lib/python2.7/os.pyc
import errno # builtin
import posix # builtin
# /home/latimerb/anaconda2/lib/python2.7/posixpath.pyc matches /home/latimerb/anaconda2/lib/python2.7/posixpath.py
import posixpath # precompiled from /home/latimerb/anaconda2/lib/python2.7/posixpath.pyc
# /home/latimerb/anaconda2/lib/python2.7/stat.pyc matches /home/latimerb/anaconda2/lib/python2.7/stat.py
import stat # precompiled from /home/latimerb/anaconda2/lib/python2.7/stat.pyc
# /home/latimerb/anaconda2/lib/python2.7/genericpath.pyc matches /home/latimerb/anaconda2/lib/python2.7/genericpath.py
import genericpath # precompiled from /home/latimerb/anaconda2/lib/python2.7/genericpath.pyc
# /home/latimerb/anaconda2/lib/python2.7/warnings.pyc matches /home/latimerb/anaconda2/lib/python2.7/warnings.py
import warnings # precompiled from /home/latimerb/anaconda2/lib/python2.7/warnings.pyc
# /home/latimerb/anaconda2/lib/python2.7/linecache.pyc matches /home/latimerb/anaconda2/lib/python2.7/linecache.py
import linecache # precompiled from /home/latimerb/anaconda2/lib/python2.7/linecache.pyc
# /home/latimerb/anaconda2/lib/python2.7/types.pyc matches /home/latimerb/anaconda2/lib/python2.7/types.py
import types # precompiled from /home/latimerb/anaconda2/lib/python2.7/types.pyc
# /home/latimerb/anaconda2/lib/python2.7/UserDict.pyc matches /home/latimerb/anaconda2/lib/python2.7/UserDict.py
import UserDict # precompiled from /home/latimerb/anaconda2/lib/python2.7/UserDict.pyc
# /home/latimerb/anaconda2/lib/python2.7/_abcoll.pyc matches /home/latimerb/anaconda2/lib/python2.7/_abcoll.py
import _abcoll # precompiled from /home/latimerb/anaconda2/lib/python2.7/_abcoll.pyc
# /home/latimerb/anaconda2/lib/python2.7/abc.pyc matches /home/latimerb/anaconda2/lib/python2.7/abc.py
import abc # precompiled from /home/latimerb/anaconda2/lib/python2.7/abc.pyc
# /home/latimerb/anaconda2/lib/python2.7/_weakrefset.pyc matches /home/latimerb/anaconda2/lib/python2.7/_weakrefset.py
import _weakrefset # precompiled from /home/latimerb/anaconda2/lib/python2.7/_weakrefset.pyc
import _weakref # builtin
# /home/latimerb/anaconda2/lib/python2.7/copy_reg.pyc matches /home/latimerb/anaconda2/lib/python2.7/copy_reg.py
import copy_reg # precompiled from /home/latimerb/anaconda2/lib/python2.7/copy_reg.pyc
# /home/latimerb/anaconda2/lib/python2.7/traceback.pyc matches /home/latimerb/anaconda2/lib/python2.7/traceback.py
import traceback # precompiled from /home/latimerb/anaconda2/lib/python2.7/traceback.pyc
# /home/latimerb/anaconda2/lib/python2.7/sysconfig.pyc matches /home/latimerb/anaconda2/lib/python2.7/sysconfig.py
import sysconfig # precompiled from /home/latimerb/anaconda2/lib/python2.7/sysconfig.pyc
# /home/latimerb/anaconda2/lib/python2.7/re.pyc matches /home/latimerb/anaconda2/lib/python2.7/re.py
import re # precompiled from /home/latimerb/anaconda2/lib/python2.7/re.pyc
# /home/latimerb/anaconda2/lib/python2.7/sre_compile.pyc matches /home/latimerb/anaconda2/lib/python2.7/sre_compile.py
import sre_compile # precompiled from /home/latimerb/anaconda2/lib/python2.7/sre_compile.pyc
import _sre # builtin
# /home/latimerb/anaconda2/lib/python2.7/sre_parse.pyc matches /home/latimerb/anaconda2/lib/python2.7/sre_parse.py
import sre_parse # precompiled from /home/latimerb/anaconda2/lib/python2.7/sre_parse.pyc
# /home/latimerb/anaconda2/lib/python2.7/sre_constants.pyc matches /home/latimerb/anaconda2/lib/python2.7/sre_constants.py
import sre_constants # precompiled from /home/latimerb/anaconda2/lib/python2.7/sre_constants.pyc
dlopen("/home/latimerb/anaconda2/lib/python2.7/lib-dynload/_locale.so", 2);
import _locale # dynamically loaded from /home/latimerb/anaconda2/lib/python2.7/lib-dynload/_locale.so
# /home/latimerb/anaconda2/lib/python2.7/_sysconfigdata.pyc matches /home/latimerb/anaconda2/lib/python2.7/_sysconfigdata.py
import _sysconfigdata # precompiled from /home/latimerb/anaconda2/lib/python2.7/_sysconfigdata.pyc
import encodings # directory /home/latimerb/anaconda2/lib/python2.7/encodings
# /home/latimerb/anaconda2/lib/python2.7/encodings/__init__.pyc matches /home/latimerb/anaconda2/lib/python2.7/encodings/__init__.py
import encodings # precompiled from /home/latimerb/anaconda2/lib/python2.7/encodings/__init__.pyc
# /home/latimerb/anaconda2/lib/python2.7/codecs.pyc matches /home/latimerb/anaconda2/lib/python2.7/codecs.py
import codecs # precompiled from /home/latimerb/anaconda2/lib/python2.7/codecs.pyc
import _codecs # builtin
# /home/latimerb/anaconda2/lib/python2.7/encodings/aliases.pyc matches /home/latimerb/anaconda2/lib/python2.7/encodings/aliases.py
import encodings.aliases # precompiled from /home/latimerb/anaconda2/lib/python2.7/encodings/aliases.pyc
# /home/latimerb/anaconda2/lib/python2.7/encodings/utf_8.pyc matches /home/latimerb/anaconda2/lib/python2.7/encodings/utf_8.py
import encodings.utf_8 # precompiled from /home/latimerb/anaconda2/lib/python2.7/encodings/utf_8.pyc
Python 2.7.15 |Anaconda, Inc.| (default, Dec 14 2018, 19:04:19) 
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/home/latimerb/anaconda2/lib/python2.7/lib-dynload/readline.so", 2);
import readline # dynamically loaded from /home/latimerb/anaconda2/lib/python2.7/lib-dynload/readline.so
>>> import neuron
import neuron # directory /home/latimerb/utils/nrn/lib/python/neuron
# /home/latimerb/utils/nrn/lib/python/neuron/__init__.pyc matches /home/latimerb/utils/nrn/lib/python/neuron/__init__.py
import neuron # precompiled from /home/latimerb/utils/nrn/lib/python/neuron/__init__.pyc
dlopen("/home/latimerb/utils/nrn/lib/python/neuron/hoc.so", 2);
dlopen("/home/latimerb/utils/nrn/lib/python/neuron/hoc.so", 2);
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/latimerb/utils/nrn/lib/python/neuron/__init__.py", line 112, in <module>
    exec("import neuron.hoc%d%d as hoc" % (sys.version_info[0], sys.version_info[1]))
  File "<string>", line 1, in <module>
ImportError: No module named hoc27


Post Reply