The use case for installing NEURON and NetPyNE directly onto your Windows OS, as opposed to through WSL is extremely limited. These instructions are therefore not recommended as a first option

For the purpose of NetPyNE development. I am writing end-to-end development walkthroughs, including this NEURON + NetPyNE Windows installation use case (not preferred)

Preferred installation method for Windows (through WSL)
(via) https://jchen6727.github.io/portal/
Anaconda
https://www.anaconda.com
GitHub
https://github.com
Jupyter
https://jupyter.org
NetPyNE
http://www.netpyne.org
NEURON
https://neuron.yale.edu/neuron/

Steps

On Windows, we will handle the Anaconda and NEURON installations separately. First, we will install Anaconda following their recommended instructions. Then, we will install NEURON through its own .exe. Finally, we will create a dev Anaconda environment and install NetPyNE within dev.

Installing Anaconda and Running Anaconda

Again, these instructions and images should be the same as found on Anaconda’s own installation guide.

  1. Download the Windows Anaconda installer .exe
  2. Run the installer .exe
  3. For the purposes of running NEURON and NetPyNE, there is no reason to change the initial recommended settings. These include:
    1. Installation for Just Me
    2. Default Path
    3. Create Start Menu Shortcuts, Register Anaconda3 as My Default Python
  4. Try running the various Anaconda tools. The Anaconda Powershell Prompt will act as our terminal on Windows.

Installing NEURON

  1. Download the Windows NEURON installer .exe
  2. Run the installer .exe
    1. Running the installer will prompt a Windows Defender warning as it is not trusted. You will have to navigate through this warning.
    2. You may wish to change the installation path. For the purposes of running NEURON and NetPyNE with Anaconda, you should select all components for install, but at the minimum should include:
      1. NEURON X.X.X AMD64
      2. Associate .hoc and .nrnzip
      3. Set DOS environment
  3. Test the installation of NEURON by starting the Anaconda Powershell Prompt and then running neuron and nrnivmodl (there won’t be anything to compile, but should get the same error warning). Try importing neuron in ipython.

Setting up a dev Anaconda environment, installing NetPyNE within dev

  1. Start the Anaconda Powershell Prompt
  2. Create a custom Anaconda dev environment and activate it
    (base) PS > conda create --name dev --clone base
    (base) PS > conda activate dev
  3. Install NetPyNE from the Anaconda environment using pip
    (dev) PS > pip install netpyne
  4. Try importing neuron and netpyne in ipython to see if the installation worked:
    (dev) > ipython -i
    >>> from neuron import h
    >>> from netpyne import specs

NOTE: NEURON and Anaconda

In our setup, NEURON and Anaconda are handled separately (instead of handling NEURON as a Python package within an Anaconda environment). We have access to NEURON within the Anaconda prompt through paths configured through the NEURON installer (why Set DOS Environment should be checked)