ImportError instance has no attribute 'message'

Post Reply
stil
Posts: 28
Joined: Thu Jul 01, 2010 8:47 am
Location: Mulhouse - France

ImportError instance has no attribute 'message'

Post by stil » Wed Apr 13, 2011 1:06 pm

Hello,

I am struggling with the installation of neuron, as a python module, on a computer node, equiped with centOS.

Step by step, i installed required packages so that configure, make, make install and setup.py work, but, eventually, i still an error when trying "import neuron" in a python console, that answers.

ImportError instance has no attribute 'message'

I want to skip IV, since i do not need the gui features, and i do not want to install X11, so i install neuron only, in /usr/local/neuron/nrn

Code: Select all

> ./configure --prefix=`pwd`  -without-iv --with-nrnpython | tee confiture.log
>make
>make install
at this stage nrniv command works, i can get the hoc interpreter, :-).

in ./src/nrnpython/ i modified setup.py, by removing 'IVHines', and finally :

Code: Select all

> python setup.py install
seems to make the work, since i can find /usr/lib64/python2.4/site-packages/neuron and the following files inside:

Code: Select all

doc.py   gui.py   hoc.so       __init__.pyc  sections.pyc
doc.pyc  gui.pyc  __init__.py  sections.py   tests
I am short on ideas right now, could anybody help with what might going on, and what I should investigate to manage this installation ?

I suspect few things:
> does the version of python have any importance 2.4 vs. 2.6 ?
> should i replace 'IVHines' with something else ? what ?

thanks for your help !

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

Re: ImportError instance has no attribute 'message'

Post by hines » Wed Apr 13, 2011 3:11 pm

I am not experiencing this problem with the latest version of NEURON. You should try again using
http://www.neuron.yale.edu/ftp/neuron/v ... 500.tar.gz
or from the mercurial repository. I used, in the $HOME/neuron/nrnnoiv build directory:
../nrn/configure '--prefix=/home/hines/neuron/nrnnoiv' '--with-nrnpython' '--without-iv'
make -j 4 install
cd src/nrnpython
python setup.py install --prefix=$HOME/nrnnoiv
export PYTHONPATH=$HOME/nrnnoiv/lib/python2.6/site-packages

$ python
Python 2.6.2 (r262:71600, May 1 2009, 12:43:29)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from neuron import h
NEURON -- VERSION 7.2 (514+:baa1af75b7eb+) 2011-04-13
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2008
See http://www.neuron.yale.edu/credits.html

>>>

Notice that I did not have to modify setup.py

stil
Posts: 28
Joined: Thu Jul 01, 2010 8:47 am
Location: Mulhouse - France

Re: ImportError instance has no attribute 'message'

Post by stil » Thu Apr 14, 2011 9:55 am

Hello,

thank you for your fast answer, it actually solved my problem.
As a result, here is what i did :

Place nrn-7.2.alpha-500.tar.gz in /usr/local/neuron
> tar xzf nrn-7.2.alpha-500.tar.gz; mv nrn-7.2 nrn
> cd /usr/local/neuron/nrn
> ./configure --prefix=`pwd` --without-iv --with-nrnpython
> make
> make install
> cd ./src/nrnpython
> python setup.py install --prefix=/usr/local/neuron

then in my /etc/profile

# PATH FOR NEURON
export NRN_HOME=/usr/local/neuron/nrn
export PATH=$PATH:$NRN_HOME/x86_64/bin
export PYTHONPATH=$PYTHONPATH:$NRN_HOME/x86_64/lib

hope that'll help !
thanks again,

Post Reply