For completeness,

The full Google Colab installation:


loading = False
from google.colab import drive
drive.mount('/content/drive')
!pip install -q condacolab

import condacolab
condacolab.install()
!conda install -c conda-forge nest-simulator

import nest
nest.__version__

!pip install nestml
import pynestml
pynestml.__version__

On Thu, May 2, 2024 at 4:04 PM Alvin Spivey <alvin.spivey@gmail.com> wrote:
This worked:

!pip install nestml
import pynestml
pynestml.__version__

Thank you everyone!

On Tue, Apr 30, 2024 at 2:45 PM Charl Linssen <nest-users@turingbirds.com> wrote:
Hi,

Try importing "pynestml" instead.

You can find several examples of how to use NESTML here: https://nestml.readthedocs.io/en/latest/tutorials/index.html

Thanks and let us know how you fare!

Kind regards,
Charl

On Tue, Apr 30, 2024, at 23:28, Alvin Spivey wrote:
Thanks Stephen,

That worked!

I assumed the same would be for nestml, but I get "NameError: name 'nestml' is not defined" :

import condacolab
condacolab.install()
!conda create --name wnestml
!conda activate wnestml
!conda install -c conda-forge nest-simulator ipython cxx-compiler pyqt wxpython boost boost-cpp libboost cmake make
!pip install nestml
import nestml
nestml.__version__

Suggestions?

Bests,

On Mon, Apr 22, 2024 at 10:02 PM Steffen Graber <s.graber@fz-juelich.de> wrote:
Hi Alvin,

You can use NEST simulator with the help of conda in google colab.
To do this, the package `condacolab`
(https://pypi.org/project/condacolab/) needs to be installed:

     !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,
>
>
> On Thu, Jan 4, 2024 at 2:39 AM Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no<mailto:hans.ekkehard.plesser@nmbu.no>> wrote:
>
> 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
>
>
>
> From: Robin Gilbert De Schepper <robingilbert.deschepper@unipv.it<mailto:robingilbert.deschepper@unipv.it>>
> Date: Thursday, 4 January 2024 at 10:44
> To: NEST User Mailing List <users@nest-simulator.org<mailto:users@nest-simulator.org>>
> Subject: [NEST Users] Re: NEST on Google Colab?
> NEST is not pip installable, using !pip install -Uqq nest will install a "network stack tester" https://pypi.org/project/nest/
>
> 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?
>
> On Sat, 23 Dec 2023 at 00:58, Anthony Lee <anthonyylee@colorado.edu<mailto:anthonyylee@colorado.edu>> wrote:
> 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
>
> On Dec 22, 2023, at 12:46, Alvin Spivey <alvin.spivey@gmail.com<mailto:alvin.spivey@gmail.com>> wrote:
> 
> 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
> _______________________________________________
> NEST Users mailing list -- users@nest-simulator.org<mailto:users@nest-simulator.org>
> To unsubscribe send an email to users-leave@nest-simulator.org<mailto:users-leave@nest-simulator.org>
> _______________________________________________
> NEST Users mailing list -- users@nest-simulator.org<mailto:users@nest-simulator.org>
> To unsubscribe send an email to users-leave@nest-simulator.org<mailto:users-leave@nest-simulator.org>
>
>
> --
> 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
> _______________________________________________
> NEST Users mailing list -- users@nest-simulator.org<mailto:users@nest-simulator.org>
> To unsubscribe send an email to users-leave@nest-simulator.org<mailto:users-leave@nest-simulator.org>
>
>
> --
> Alvin J. Spivey, Ph.D.
> (c) 843.267.8055
>
>
> _______________________________________________
> NEST Users mailing list -- users@nest-simulator.org
> To unsubscribe send an email to users-leave@nest-simulator.org

--
--------------------------------------------------------------
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
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org


--
Alvin J. Spivey, Ph.D.
(c) 843.267.8055 
_______________________________________________
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


--
Alvin J. Spivey, Ph.D.
(c) 843.267.8055 


--
Alvin J. Spivey, Ph.D.
(c) 843.267.8055