A Neurosim Build Using Windows
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)
Links
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.
- Download the Windows Anaconda installer
.exe
- Run the installer .exe
- For the purposes of running
NEURON
andNetPyNE
, there is no reason to change the initial recommended settings. These include:
- Installation for Just Me
- Default Path
- Create Start Menu Shortcuts, Register Anaconda3 as My Default Python
- Installation for Just Me
- Try running the various Anaconda tools. The
Anaconda Powershell Prompt
will act as ourterminal
on Windows.
Installing NEURON
- Download the Windows NEURON installer
.exe
- Run the installer .exe
- Running the installer will prompt a Windows Defender warning as it is not trusted. You will have to navigate through this warning.
- You may wish to change the installation path. For the purposes of running
NEURON
andNetPyNE
withAnaconda
, you should select all components for install, but at the minimum should include:
- NEURON X.X.X AMD64
- Associate .hoc and .nrnzip
- Set DOS environment
- NEURON X.X.X AMD64
- Running the installer will prompt a Windows Defender warning as it is not trusted. You will have to navigate through this warning.
- Test the installation of NEURON by starting the
Anaconda Powershell Prompt
and then runningneuron
andnrnivmodl
(there won’t be anything to compile, but should get the same error warning). Try importing neuron inipython
.
Setting up a dev Anaconda environment, installing NetPyNE within dev
- Start the
Anaconda Powershell Prompt
- Create a custom Anaconda
dev
environment andactivate
it
(base) PS > conda create --name dev --clone base
(base) PS > conda activate dev
- Install
NetPyNE
from the Anaconda environment using pip
(dev) PS > pip install netpyne
- 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)