I would like to install a custom neuron model in NEST so I followed the instructions for the nest-extension-module. It is able to build the .so files but it errors during the final install of the project as seen in the below message.
Install the project... -- Install configuration: "" -- Installing: /home/bs/git_repos/extension/nest-simulator/result/include/piftestmodule/pif_psc_alpha.h -- Installing: /home/bs/git_repos/extension/nest-simulator/result/lib/nest/piftestmodule.so -- Installing: /home/bs/git_repos/extension/nest-simulator/result/lib/nest/libpiftestmodule.so Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/bs/git_repos/extension/nest-simulator/result/lib/python3.8/site-packages/nest/__init__.py", line 444 err = AttributeError(f"Cannot set attribute '{attr}' on module 'nest'")
I am trying to install one of the example neurons provided first (pif_psc_alpha) so I do not expect that it is an issue within the source files. Thanks for any advice in correcting this issue!
Hi,
This is not addressing your actual question, but I just wanted to check whether you know about NESTML for writing custom neuron models (https://nestml.readthedocs.org/) and whether there were any reasons you might prefer to write the model "by hand" in C++ (there certainly might be! Just curious.)
With kind regards, Charl
On Fri, Jan 13, 2023, at 14:38, bstrohmer@gmail.com wrote:
I would like to install a custom neuron model in NEST so I followed the instructions for the nest-extension-module. It is able to build the .so files but it errors during the final install of the project as seen in the below message.
Install the project... -- Install configuration: "" -- Installing: /home/bs/git_repos/extension/nest-simulator/result/include/piftestmodule/pif_psc_alpha.h -- Installing: /home/bs/git_repos/extension/nest-simulator/result/lib/nest/piftestmodule.so -- Installing: /home/bs/git_repos/extension/nest-simulator/result/lib/nest/libpiftestmodule.so Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/bs/git_repos/extension/nest-simulator/result/lib/python3.8/site-packages/nest/__init__.py", line 444 err = AttributeError(f"Cannot set attribute '{attr}' on module 'nest'")
I am trying to install one of the example neurons provided first (pif_psc_alpha) so I do not expect that it is an issue within the source files. Thanks for any advice in correcting this issue! _______________________________________________ NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org
Hi Charl, Yes, I actually started out in NESTML and was able to integrate a new neuron model in NEST so it worked really well. Unfortunately, I need to add gap junction support to my neuron model which is why I was forced to code "by hand".
On Fri, Jan 13, 2023 at 2:41 PM Charl Linssen nest-users@turingbirds.com wrote:
Hi,
This is not addressing your actual question, but I just wanted to check whether you know about NESTML for writing custom neuron models ( https://nestml.readthedocs.org/) and whether there were any reasons you might prefer to write the model "by hand" in C++ (there certainly might be! Just curious.)
With kind regards, Charl
On Fri, Jan 13, 2023, at 14:38, bstrohmer@gmail.com wrote:
I would like to install a custom neuron model in NEST so I followed the instructions for the nest-extension-module. It is able to build the .so files but it errors during the final install of the project as seen in the below message.
Install the project... -- Install configuration: "" -- Installing:
/home/bs/git_repos/extension/nest-simulator/result/include/piftestmodule/pif_psc_alpha.h
-- Installing:
/home/bs/git_repos/extension/nest-simulator/result/lib/nest/piftestmodule.so
-- Installing:
/home/bs/git_repos/extension/nest-simulator/result/lib/nest/libpiftestmodule.so
Traceback (most recent call last): File "<string>", line 1, in <module> File
"/home/bs/git_repos/extension/nest-simulator/result/lib/python3.8/site-packages/nest/__init__.py",
line 444 err = AttributeError(f"Cannot set attribute '{attr}' on module 'nest'")
I am trying to install one of the example neurons provided first (pif_psc_alpha) so I do not expect that it is an issue within the source files. Thanks for any advice in correcting this issue! _______________________________________________ NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org
NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org
Ah, OK, understood! In case you find you need to add a small bit of custom C++ code to an otherwise "standard" NESTML neuron model, you could also add this into the Jinja templates, optionally with an extra clause like {% if neuronName == "my_custom_neuron_model" %} ... {% endif %}. Optionally you can make a copy of the default templates and specify the paths to the customized copy via the mechanism described at https://nestml.readthedocs.io/en/latest/extending.html#running-nestml-with-c...
Please let me know in case you run into any trouble should you decide to give this approach a chance.
On Fri, Jan 13, 2023, at 14:45, Beck Strohmer wrote:
Hi Charl, Yes, I actually started out in NESTML and was able to integrate a new neuron model in NEST so it worked really well. Unfortunately, I need to add gap junction support to my neuron model which is why I was forced to code "by hand".
On Fri, Jan 13, 2023 at 2:41 PM Charl Linssen nest-users@turingbirds.com wrote:
Hi,
This is not addressing your actual question, but I just wanted to check whether you know about NESTML for writing custom neuron models (https://nestml.readthedocs.org/) and whether there were any reasons you might prefer to write the model "by hand" in C++ (there certainly might be! Just curious.)
With kind regards, Charl
On Fri, Jan 13, 2023, at 14:38, bstrohmer@gmail.com wrote:
I would like to install a custom neuron model in NEST so I followed the instructions for the nest-extension-module. It is able to build the .so files but it errors during the final install of the project as seen in the below message.
Install the project... -- Install configuration: "" -- Installing: /home/bs/git_repos/extension/nest-simulator/result/include/piftestmodule/pif_psc_alpha.h -- Installing: /home/bs/git_repos/extension/nest-simulator/result/lib/nest/piftestmodule.so -- Installing: /home/bs/git_repos/extension/nest-simulator/result/lib/nest/libpiftestmodule.so Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/bs/git_repos/extension/nest-simulator/result/lib/python3.8/site-packages/nest/__init__.py", line 444 err = AttributeError(f"Cannot set attribute '{attr}' on module 'nest'")
I am trying to install one of the example neurons provided first (pif_psc_alpha) so I do not expect that it is an issue within the source files. Thanks for any advice in correcting this issue! _______________________________________________ NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org
NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org
NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org
Dear bstrohmer@gmail.com,
which version of NEST are you using and from where (release? git?), which are the "instructions" you followed (links!) and what is the sequence of commands leading to this error (bash/Python)?
Please be more specific. Right now, your inquiry reads like "I did something and it did not work. Help!" and I am afraid, we can't help you much with just the information you provided.
Cheers, Jochen!
On 13.01.23 14:38, bstrohmer@gmail.com wrote:
I would like to install a custom neuron model in NEST so I followed the instructions for the nest-extension-module. It is able to build the .so files but it errors during the final install of the project as seen in the below message.
Install the project... -- Install configuration: "" -- Installing: /home/bs/git_repos/extension/nest-simulator/result/include/piftestmodule/pif_psc_alpha.h -- Installing: /home/bs/git_repos/extension/nest-simulator/result/lib/nest/piftestmodule.so -- Installing: /home/bs/git_repos/extension/nest-simulator/result/lib/nest/libpiftestmodule.so Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/bs/git_repos/extension/nest-simulator/result/lib/python3.8/site-packages/nest/__init__.py", line 444 err = AttributeError(f"Cannot set attribute '{attr}' on module 'nest'")
I am trying to install one of the example neurons provided first (pif_psc_alpha) so I do not expect that it is an issue within the source files. Thanks for any advice in correcting this issue! _______________________________________________ NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org
Hi Jochen, thanks for the response. I am using NEST 3.3 on Ubuntu 20.04.5 LTS which I installed from the command line (sudo apt-get install nest). However, when I build the nest-extension-module code it installs a fresh version of NEST from git (git clone https://github.com/nest/nest-simulator.git). I have followed the README from the extension module git (https://github.com/nest/nest-extension-module/). I cloned the repository to my local machine and then updated the CMakeLists.txt files in the outermost directory to have a unique short name for the module as well as read from the pif_psc_alpha.h file for the MODULE_HEADER. Finally, I updated the CMakeLists.txt in the src directory so that it only has one source (pif_psc_alpha.cpp pif_psc_alpha.h). These are the only changes that I make to the provided files. After this I run ./build.sh from the terminal, this installs the fresh NEST installation as mentioned above and it builds the .so files but errors on the installation. Let me know if I can provide any other details. Thanks!
SOLVED! I was running a different NEST simulation and accidentally called the simulation with python sim.py instead of python3 and it threw me the same error. I then saw that 'python' is used in the build.sh file so I replaced it with 'python3' and it worked. Thanks for taking the time to write to me and I hope if anyone else has this issue with python versioning, this thread might help. :)