Can't Load .mod files in Python Script
Posted: Wed Jul 20, 2022 9:27 am
Good Day Neuron Community,
I am having a slight issue with accessing my mod files in my python script.
I am new to using Neuron and Python on a Mac (M1), and I am struggling in setting up the new method of h.nrn_load_dll for mac. I assume I have done everything correctly namely these steps below:
1. Dragging and dropping the folder containing all the .mod files onto mknrndll. This creates a folder named arm64, containing the .o and .c files for the various .mod files as well as a libnrnmech.dylib, special, makemod2c_inc, mod_func.cpp, mod_func.o, special.dSYM files. The response of the mknrndll terminal is successful as well, it contains no errors.
2. When clicking on the special file it opens the terminal stating:
Thus my assumption is that the mechanisms are accessible in neuron.
3. In my very basic python script (for debugging purposes) where I want to use these mechanisms I do as follows:
The returning error when running this python script is:
I am very aware I am most probably loading the mechanisms incorrectly into the python script, but I cannot find a solution on an alternative of how to do this, thus, any guidance or assistance will be greatly appreciated.
Kind regards
Elizabeth
I am having a slight issue with accessing my mod files in my python script.
I am new to using Neuron and Python on a Mac (M1), and I am struggling in setting up the new method of h.nrn_load_dll for mac. I assume I have done everything correctly namely these steps below:
1. Dragging and dropping the folder containing all the .mod files onto mknrndll. This creates a folder named arm64, containing the .o and .c files for the various .mod files as well as a libnrnmech.dylib, special, makemod2c_inc, mod_func.cpp, mod_func.o, special.dSYM files. The response of the mknrndll terminal is successful as well, it contains no errors.
2. When clicking on the special file it opens the terminal stating:
Code: Select all
lizzy@Lizzys-MacBook-Air ~ % /Users/lizzy/Downloads/2022\ M/Neuron\ Mod\ Files/arm64/special ; exit;
NEURON -- VERSION 8.2.0 HEAD (156b9dee3) 2022-07-01
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2021
See http://neuron.yale.edu/neuron/credits
Additional mechanisms from files
"hcnobo.mod" "ipulse1.mod" "ipulse2.mod" "ipulse3.mod" "jsrnaf.mod" "kht.mod" "klt.mod" "leak.mod" "vecevent.mod"
3. In my very basic python script (for debugging purposes) where I want to use these mechanisms I do as follows:
Code: Select all
from neuron import h,gui
h.nrn_load_dll("/Users/lizzy/Downloads/2022 M/Neuron Mod Files/arm64")
soma = h.Section(name='soma')
soma.insert('klt')
Code: Select all
File "/Users/lizzy/Downloads/2022 M/test.py", line 4, in <module>
soma.insert('klt')
ValueError: argument not a density mechanism name.
Kind regards
Elizabeth