help installing on WSL

Post Reply
Posts: 1
Joined: Fri May 22, 2020 8:39 am

help installing on WSL

Post by jpduf »


I'm trying to install NEURON on Windows subsystem for linux in order to use the brain modelling toolkit (BMTK). I have previously used NEURON on Windows successfully.
I am pretty new to linux and I installed Ubuntu on Windows subsystem for linux. I installed anaconda and BMTK. I am trying to compile NEURON as suggested on the BMTK website as they advise precompiled versions might cause errors if used with anaconda. When following the instructions to compile NEURON ( ... pile_linux), I get the following errors during make -j and make install -j commands during the NEURON setup (setting up InterViews seems to work fine)

make -j:
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:780: nrniv] Error 1
make[3]: Leaving directory '/home/jpduf/nrn/src/nrniv'
make[2]: *** [Makefile:519: all-recursive] Error 1
make[2]: Leaving directory '/home/jpduf/nrn/src'
make[1]: *** [Makefile:656: all-recursive] Error 1
make[1]: Leaving directory '/home/jpduf/nrn'
make: *** [Makefile:514: all] Error 2

install -j:
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:780: nrniv] Error 1
make[2]: Leaving directory '/home/jpduf/nrn/src/nrniv'
make[1]: *** [Makefile:519: install-recursive] Error 1
make[1]: Leaving directory '/home/jpduf/nrn/src'
make: *** [Makefile:656: install-recursive] Error 1

If I then try to run the command I get this:

(py38) jpduf@DESKTOP-PUSH6CU:~/nrn/src/nrnpython$ sudo python3 install
running install
running build
running build_py
error: package directory '/usr/local/nrn/share/nrn/lib/python/neuron' does not exist

I am not sure how to proceed. Any help would be greatly appreciated and of course I am ready to provide more information if requested.

Thanks again,

Posts: 225
Joined: Fri Nov 28, 2008 3:38 pm
Location: Yale School of Public Health

Re: help installing on WSL

Post by ramcdougal »

Simple work-around: don't compile NEURON yourself. :)

BMTK supports all the way back to NEURON 7.4 which is almost 5 years old, and any guidance you're seeing about issues with NEURON and Anaconda (which we now explicitly suggest using in the NEURON quickstart guide) pertains to old versions of NEURON.

The default install of Anaconda gives you Python 3.7. If you're using that, everything should just work with the Windows installer for NEURON 7.7.2. (This is the combination I use with Windows.)

If you want NEURON inside your WSL environment, you can probably just do "sudo pip3 install neuron" inside the Ubuntu for Windows (it works in regular Ubuntu).

If you've created a Python 3.8 environment on Windows (not WSL), that's newer than 7.7.2 so that won't just work. The simplest solution is to run in a Python 3.7 environment instead, but there are alternatives that don't require compiling NEURON.

As far as your error messages go: this is all after the error has occurred. We'd need to see more (starting right before there were any error messages) to comment.
Post Reply