Anaconda Python + Spyder on Windows Subsystem for Linux

Python on Windows can be used with Windows Subsystem for Linux. Using Python on WSL can be advantageous because of easier compiler access. This procedure includes the graphical Spyder IDE if you so desire.

Install Python in WSL

These commands are all from the Linux / WSL Terminal.

Download Miniconda (50 MB)


Install Miniconda

bash Miniconda3*.sh

Press space bar a few times till it asks you to type yes and prepend the path to ~/.bashrc (the default choice).

Setup Spyder IDE in WSL

Ensure X11 prereqs are installed, including:

apt install libxcomposite libxss1

If Spyder won’t start, look in the error message for such missing libraries.

Setup X11 for WSL and then install Spyder:

conda install matplotlib spyder


You may be missing X11 prereqs, which will be specified in the error message on starting GUI programs like Spyder. Look above the error:

ModuleNotFoundError: No module named ‘PyQt5.QtWebKitWidgets’

to see if things like libxcomposite or libxss etc. need to be installed via apt install.

Matplotlib trouble?

Notes on setting up Matplotlib for WSL

old Windows 10: WSL Ubuntu 14.04

Windows builds with WSL Ubuntu 16.04 / 18.04 work fine.

Very old Windows 10 Builds using Ubuntu 14.04 won’t work with MKL. You’ll get errors when using MKL-using modules like Scipy or Numpy on

import scipy; scipy.test()

OMP: Error #100: Fatal system error detected. OMP: System error #22: Invalid argument

Workaround: install MKL-less versions of these packages by

conda install nomkl