Workaround for problems loading mechs from nrnmech.dll

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

Moderator: hines

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

Workaround for problems loading mechs from nrnmech.dll

Post by ted »

This tip is from Michael Hines. It's for MSWin users who have Enthought Canopy.

If you're running NEURON from Python, and you're getting an error message that says something like

Code: Select all

loading membrane mechanisms from nrnmech.dll
LoadLibrary("nrnmech.dll") failed with error 126
dlopen failed -
try one of these two workarounds.

Workaround 1. Copy the nrnmech.dll file you wish to use into /c/nrn/bin. This isn't ideal, because it means you're tinkering with stuff in NEURON's installation tree (generally not a good idea), and also because it's not convenient if you're working on two or more different modeling projects, each of which needs its own nrnmech.dll--but at least you'll be able to work productively on one project at a time.

Workaround 2. Assuming that you're starting Python from the bash shell, cd to the directory where your nrnmech.dll file is located, then execute

Code: Select all

export PATH=$PATH:.
(remember to include that period after the colon!) before you launch Python. This adds the current working directory to the PATH.

The latter is probably the best workaround if you have two or more modeling projects, each with its own nrnmech.dll, because when you want to switch from one project to another, all you have to do is open a new bash shell, cd to the new project's home directory (where the nrnmech.dll is located), and execute

Code: Select all

export PATH=$PATH.
Post Reply