Error running NEURON with embedded Python

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

Moderator: hines

Post Reply
ttarnaud
Posts: 1
Joined: Fri Dec 07, 2018 8:17 am

Error running NEURON with embedded Python

Post by ttarnaud »

Dear all,

I installed the precompiled NEURON 7.6.3 and Python 3.7.1 on Windows 10.
Running NEURON from Python with "from neuron import h" is working well, however the opposite (starting nrniv.exe -python), results in an error:

Code: Select all

NEURON -- VERSION 7.6.3 master (85d62db7) 2018-11-21
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2018
See http://neuron.yale.edu/neuron/credits

Could not load libnrnpython/P
pyver10=0 pylib=C:/Users/ttarnaud.PCNAME/AppData/Local/Programs/Python/Python37/python37.dll
Python not available

NEURON exited abnormally. Press the return key to close this window
I am not sure how to fix this: is it necessary to compile NEURON from sources on Windows 10?
drunja40
Posts: 8
Joined: Thu Aug 19, 2021 9:05 am

Re: Error running NEURON with embedded Python

Post by drunja40 »

Was this somehow resolved? I still get it with NEURON 7.6.7 and Python 3.7.9 on Windows 10
drunja40
Posts: 8
Joined: Thu Aug 19, 2021 9:05 am

Re: Error running NEURON with embedded Python

Post by drunja40 »

I fixed the problem by properly setting all environmental variables:

Path should include:
C:\Program Files\Python37
C:\Program Files\Python37\Scripts
c:\nrn\bin
c:\nrn\mingw\usr\bin

PYTHONPATH:
c:\nrn\lib\python

NEURONHOME:
c:\nrn
ted
Site Admin
Posts: 5981
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Error running NEURON with embedded Python

Post by ted »

Thanks for following up with the fix for that!
Post Reply