Problem loadg modules in Neuron Python

Post Reply
viniciuslima
Posts: 7
Joined: Wed Mar 29, 2017 9:01 pm

Problem loadg modules in Neuron Python

Post by viniciuslima » Fri Apr 21, 2017 12:47 pm

Hello!

After compiling some mechanisms (.mod) and importing neuron on python, i get the following error message:

Code: Select all

In [1]: from neuron import h
NEURON -- Release 7.4 (1370:16a7055d4a86) 2015-11-09
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2015
See http://www.neuron.yale.edu/neuron/credits

loading membrane mechanisms from x86_64/.libs/libnrnmech.so
dlopen failed - 
x86_64/.libs/libnrnmech.so: undefined symbol: nrnmpi_myid
How can i solve this?
Thansks.

ted
Site Admin
Posts: 5376
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Problem loadg modules in Neuron Python

Post by ted » Fri Apr 21, 2017 5:22 pm

Compiling mod files should produce a subdirectory called x86_64 (or i686 if the OS is 32 bits). Make sure that the py, hoc, and ses files that are used by your program are all located in the directory that contains the x86_64 subdirectory. If that is already the case, suggest deleting x86_64 and everything it contains, then compile the mod files again.

viniciuslima
Posts: 7
Joined: Wed Mar 29, 2017 9:01 pm

Re: Problem loadg modules in Neuron Python

Post by viniciuslima » Fri Apr 21, 2017 10:50 pm

I tried it with no sucess.
That's funny because only neuron as a python module don't load the mechanisms, if i run the .hoc code it works fine.

ramcdougal
Posts: 141
Joined: Fri Nov 28, 2008 3:38 pm
Location: Yale School of Medicine

Re: Problem loadg modules in Neuron Python

Post by ramcdougal » Sat Apr 22, 2017 11:36 pm

A few questions:

(1) How did you install NEURON? (e.g. from source or from a binary? On what platform?)
(2) Do you get the same version printout if you just run nrniv?
(3) If you run, "nrngui -python" (without the quotes) and import neuron, does it work?

viniciuslima
Posts: 7
Joined: Wed Mar 29, 2017 9:01 pm

Re: Problem loadg modules in Neuron Python

Post by viniciuslima » Mon Apr 24, 2017 2:13 pm

Hello McDougal

(1) I've installed it from the source, following the instructions given in: https://www.neuron.yale.edu/neuron/down ... pile_linux

(2) If I run nrniv -nopython, I get no errors

Code: Select all

nrniv -nopython
NEURON -- Release 7.4 (1370:16a7055d4a86) 2015-11-09
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2015
See http://www.neuron.yale.edu/neuron/credits

oc>
(3) If i run "nrngui -python" I get:

Code: Select all

nrngui -python
NEURON -- Release 7.4 (1370:16a7055d4a86) 2015-11-09
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2015
See http://www.neuron.yale.edu/neuron/credits

loading membrane mechanisms from /home/vinicius/Downloads/BIOLCYBERN/x86_64/.libs/libnrnmech.so
Additional mechanisms from files
 HH_traub.mod IL_gutnick.mod IM_cortex.mod IT_huguenard.mod cadecay_destexhe.mod
ImportError: No module named site
Py_Initialize exited. PYTHONHOME probably needs to be set correctly.
Our automatic guess based on the Python shared library location:
    export PYTHONHOME=/usr/lib
did not work.
It will help to examine the output of:
nrnpyenv.sh
and set the indicated environment variables, or avoid python by adding
nopython: on
to /usr/local/nrn/share/nrn/lib/nrn.defaults (or .nrn.defaults in your $HOME directory)


ted
Site Admin
Posts: 5376
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Problem loadg modules in Neuron Python

Post by ted » Mon Apr 24, 2017 2:56 pm

What OS are you using? (distribution and version number, please)
What Python are you using--version number, and is it part of your Linux OS's standard distribution, or did you install a different Python from somewhere else?

viniciuslima
Posts: 7
Joined: Wed Mar 29, 2017 9:01 pm

Re: Problem loadg modules in Neuron Python

Post by viniciuslima » Mon Apr 24, 2017 3:18 pm

Hi Ted,

I'm using KDE neon LTS User Edition 5.8, which is based on Ubuntu 16.04 LTS.
I'm using python2.7, that came installed on the OS by default.
To configure neuron i used the command : ./configure --prefix=`pwd` --with-iv=$HOME/neuron/iv --with-nrnpython=/usr/bin/python2.7.

Post Reply