Windows build


You need to install the following:

Build Environment installation

You can follow the lines of the scripts from the ci folder. The scripts can also be launched as-is for local installation. Perform a git clone of the nrn repository.

From a powershell with administrator priviledges, run:

PS C:\workspace\nrn> .\ci\win_download_deps.cmd

This will download all required installers and corresponding versions(Python, MPI, nsis)

Then launch the installation script:

PS C:\workspace\nrn> .\ci\win_install_deps.cmd

in order to:

  • install all downloaded Python versions and for each:
    • fix MSVCC version
    • fix MSVC runtime library
    • install numpy
  • install nsis and required plugin
  • install MPI
  • install MSYS2 (via Chocolatey) and then MinGW toolchain and required build pacakages

How to build NEURON

For a complete build/install/create setup.exe, in a MinGW64 shell you can run:

$ bash ci/

As you can see in the script, a typical configuration would be:

/mingw64/bin/cmake .. \
	-G 'Unix Makefiles'  \
	-DCMAKE_PREFIX_PATH='/c/msmpi'  \
	-DPYTHON_EXECUTABLE=/c/Python37/python.exe \
	-DNRN_PYTHON_DYNAMIC='c:/Python37/python.exe;c:/Python38/python.exe;c:/Python39/python.exe;c:/Python310/python.exe'  \
	-DCMAKE_INSTALL_PREFIX='/c/nrn-install' \

To create the Windows installer, you need to run:

make install
make setup_exe