SMO Wiki

A pretty snapshot of the Wiki brought to you by the Social Media Observatory at HBI

Windows Linux Subsystem dev setup

How to setup a Python development environment on Windows 10?

This is an opinionated guide for a science-oriented development setup on Windows 10.

Table of contents

Windows Subsystem for Linux (WSL)

The Windows Linux subsystem allows for taking advantage of some of the open-source-based development ease of the Linux World while staying in the Windows world. This will give you a CLI for Ubuntu only, however. If you want to get the full graphical desktop experience, we recommend to install Ubuntu, or one of its derivatives (Xubunut, Mint, etc.) as a dual-boot-system.

To get your Linux-based setup in Windows 10, follow these steps:

Pipenv (Pragmatic Installation)

Pipenv allows you to separate and reproducibly document the Python environments you are working in for different projects.

Visual Studio Code

Visual Studio Code is a highly customisable code and text editor that is able to deliver an IDE-like experience via a vast ecosystem of extensions for all popular programming languages.

Package Installation and Environment Setup:

Jupyter Lab

While VS Code has also extensions for Jupyter Notebooks (a browser-based platform for interactive programming in several languages, like Julia, Python, and R), Jupyter Lab is more powerful, and closer to what you will be most likely to share with colleagues and/or the public to make your research transparent.

Here is a short guide on best practices for getting and working with it:

How to work in Jupyter Lab

Miniconda (optional)

Install Miniconda, an alternative to pipenv that is sometimes preferable, depending on your projects dependencies.

Docker (optional)

Docker allows to virtualise whole operating systems, which makes it suitable for the development of larger software projects that are meant to be reproducibly deployed in a server environment and encompass several pieces of software (e.g. data collection tools, databases, and data analysis tools) requiring complex, entangled setups.