Windows Subsystem Linux is a powerful tool that allows developers on Windows to run a GNU/Linux environment directly on Windows, unmodified, without requiring the overhead of traditional VM or dualboot setup. If you are a traditional Windows User who is interested in learning GNU/Linux, WSL can serves as a very easy first step–letting you keep the creature comforts of working with Microsoft development tools while also giving you the ability to work with the a highly versatile and popular (i.e. documented) OS used in development.

For the purpose of NetPyNE development. I am writing end-to-end development walkthroughs, including this starting intro to running NetPyNE on Windows through WSL (preferred).

Windows Subsystem Linux


How to set up your Virtual Machine

  1. Start Windows PowerShell as an administrator
  2. Use Windows PowerShell to install Linux with wsl --install
  3. Reboot your system
  4. The Ubuntu subsystem will now be accessible as an app in windows. Thats it! You now have access to your subsystem Linux, create your profile username and password through the terminal.

NOTE: Accessing your Windows/Linux files

Within your linux subsystem, you can access your Windows files under the directory /mnt. You can change to this directory with command cd /mnt from the Ubuntu
Within your Windows machine, you can access your Linux files under the directory \\wsl$. By opening File Explorer, you can view all files in your linux subsystem by replacing the entry in the left navigation bar with \\wsl$

Setting up your Python environment - Anaconda installation,

  1. Get the Linux Anaconda Installer here:
  2. Open your file explorer
  3. In the file explorer search bar navigate to:
  4. Move your Linux Anaconda Installer to your Ubuntu\tmp directory
  5. Start Ubuntu on Windows
  6. In your Linux subsystem perform the following steps:
  7. Navigate to your tmp directory using:
    $ cd /tmp
  8. run the shell script with the following command:
    $ bash
    you can autocomplete the line by using the Tab button
    type yes when prompted by the installer
  9. Restart your Linux subsystem shell with:
    $ source ~/.bashrc
  10. Install NEURON and NetPyNE from the Linux subsytem shell with Python’s built-in installer pip:
    $ pip install neuron
    $ pip install netpyne
  11. Run Python
  12. Execute the following lines of code to see if the imports are correct:
    >>> from neuron import h
    >>> from netpyne import specs
    Thats it! You now are running NetPyNE and NEURON on your subsystem Linux