Hi Alvin,
You can use NEST simulator with the help of conda in google colab.
To do this, the package `condacolab`
!pip install -q condacolab
import condacolab
condacolab.install()
Then you can use `conda` or `mamba`:
!mamba install -c conda-forge nest-simulator
NEST should now be usable:
import nest
nest.__version__
Best
Steffen
Am 09.04.24 um 22:39 schrieb Hans Ekkehard Plesser:
>
> Hi Alvin,
>
> #Instructions from:
>
> If you clone NEST, you then need to compile it. On Google Colab, it you might want to try to install NEST via Conda/Mamba.
>
> import nest
> import matplotlib.pyplot as plt
> neuron = nest.Create("iaf_psc_alpha")
>
> This likely did not import the NEST Simulator package nest but something else. When NEST is imported, you will see a message like
>
>
> In [1]: import nest
>
>
>
> -- N E S T --
>
> Copyright (C) 2004 The NEST Initiative
>
>
>
> Version: 3.7.0-rc1
>
> Built: Apr 5 2024 08:41:00
>
>
>
> This program is provided AS IS and comes with
>
> NO WARRANTY. See the file LICENSE for details.
>
>
>
> Problems or suggestions?
>
>
>
>
> Type 'nest.help()' to find out more about NEST.
>
>
>
>
>
> ---------------------------------------------------------------------------
>
> AttributeError Traceback (most recent call last)
>
>
> 4 import nest
>
> 5 import matplotlib.pyplot as plt
>
> ----> 6 neuron = nest.Create("iaf_psc_alpha")
>
>
>
> AttributeError: module 'nest' has no attribute 'Create'
>
>
>
> NESTML:
>
> #Instructions from:
>
> %cd nestml
> !pwd
> !python setup.py install
> !python setup.py test
> !pip install -Uqq pysilsub
> !pip install -Uqq nest
> import sklearn
> import scipy
> import nest
> import pynestml as nestml
> import numpy as np
> import matplotlib.pyplot as plt
> from pysilsub import observers
> nestml.help('Create')
>
> nestml does not have a help() function, but nest.help(‘Create’) should work (don’t cut and paste that last piece of code, I could not stop Outlook from modifying the quotes).
>
> Best regards,
> Hans Ekkehard
>
>
>
> ---------------------------------------------------------------------------
>
> AttributeError Traceback (most recent call last)
>
>
> 17 import matplotlib.pyplot as plt
>
> 18 from pysilsub import observers
>
> ---> 19 nestml.help('Create')
>
> 20
>
>
>
> AttributeError: module 'pynestml' has no attribute 'help'
>
>
> I appreciate any help to install and use the software,
>
>
>
> As an alternative, the EBRAINS research infrastructure offers collaboratories with NEST and many other neuroscience tools pre-installed, see
>
>
> Best,
> Hans Ekkehard
>
> --
>
> Prof. Dr. Hans Ekkehard Plesser
>
> Department of Data Science
> Faculty of Science and Technology
> Norwegian University of Life Sciences
> PO Box 5003, 1432 Aas, Norway
>
> Phone +47 6723 1560
>
>
>
> Date: Thursday, 4 January 2024 at 10:44
> Subject: [NEST Users] Re: NEST on Google Colab?
>
> You will have to follow another installation route. I'm not sure which one is recommended for Google Collab. Perhaps the conda or CMake installation?
>
> Hey Alvin,
>
> You may have to restart the kernel because the installation was installed via a child shell process and have yet to be loaded into the current process that the kernel is running on.
>
> IIRC, it is called “Restart runtime” in Google Colab.
>
> Anthony
>
>
> I'm trying to install and use NEST on google Colab, but it's not importing:
>
> !pip install -Uqq nest
> !pip install -Uqq nestml
> !pip install -Uqq pysilsub
> import nest
> import nestml
> import numpy as np
> import matplotlib.pyplot as plt
> from pysilsub import observers
> from nestml.network import Network
> from nestml.models import ConeNakaRushton
>
> Am I able to use NEST on Google Colab?
> --
> Alvin J. Spivey, Ph.D.
> (c) 843.267.8055
> _______________________________________________
> _______________________________________________
>
>
> --
> Robin De Schepper, PhD (they/them)
> Department of Brain and Behavioral Sciences
> Unit of Neurophysiology
> University of Pavia, Italy
> Via Forlanini 6, 27100 Pavia - Italy
> Tel: (+39) 038298-7607
> _______________________________________________
>
>
> --
> Alvin J. Spivey, Ph.D.
> (c) 843.267.8055
>
>
> _______________________________________________
--
--------------------------------------------------------------
Steffen Graber
Institute for Advanced Simulation (IAS-6), Computational and
Systems Neuroscience & JARA-Institute Brain Structure-Function
Relationships (INM-10)
Forschungszentrum Jülich GmbH
Forschungszentrum Jülich GmbH
Institute for Advanced Simulation
Jülich Supercomputing Centre (JSC)
Simulation & Data Lab Neuroscience
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
Forschungszentrum Jülich GmbH
52425 Jülich
Sitz der Gesellschaft: Jülich
Eingetragen im Handelsregister des Amtsgerichts Düren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Stefan Müller
Geschäftsführung: Prof. Dr. Astrid Lambrecht (Vorsitzende),
Karsten Beneke (stellv. Vorsitzender), Dr. Ir. Pieter Jansens
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
_______________________________________________