'nrniv -python' Not Working

Post Reply
roybens
Posts: 38
Joined: Fri Mar 14, 2008 7:57 am

'nrniv -python' Not Working

Post by roybens » Tue May 24, 2016 5:07 pm

I installed Neuron 7.4 from the binary package from Windows and set up my PYTHONPATH and NEURONHOME so everything points to the correct directories.
When I run python 2.7 and import neuron, the import works and I can load files and access information from neuron.h.
However, when I try to run 'nrniv -python', this is the error message that is given to me:

Code: Select all

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

Python not available
Additionally, when I loading the neuron dll from Python, this is what happens:

Code: Select all

>>> from neuron import nrn_dll
>>> dll = nrn_dll()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\nrn\lib\python\neuron\__init__.py", line 454, in nrn_dll
    raise Exception('unable to connect to the NEURON library')
Exception: unable to connect to the NEURON library
According to this thread: viewtopic.php?f=6&t=2005, it says that I need to build Neuron from source in order to access the Neuron dll, but that thread is over 5 years old. Is it possible to get 'nrniv -python' working and run 'nrn_dll()' without any errors without building from source?

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

Re: 'nrniv -python' Not Working

Post by hines » Wed May 25, 2016 11:40 pm

The "python not available" is unusual for a version of NEURON that is built with python.
Assuming that this is some kind of environment problem, it make take a few rounds of experiments to figure it out. So let's take this to email and send the
results of the following to michael dot hines at yale dot edu.

Are you using the x86_64 or i686 version of NEURON. What windows os are you using. What is your cpu type.

Start the bash terminal. What is the result of
echo $PYTHONPATH
echo $PYTHONHOME
echo $LD_LIBRARY_PATH

for each of the above three that are not empty, unset them and then what is the result of
nrnpyenv.sh

What is the result of launching
nrniv -nopython
nrniv
nrniv -python

what python are you using
python
import sys
sys.version

Post Reply