Skip to content

Environment Setup - Windows (WSL) ​

This guide provides step-by-step instructions on how to install Python 3.10 and Docker on your Windows system using Windows Subsystem for Linux (WSL).

💡 We provide a prebuilt image for you to get started with containing everything you need to work with Composabl

Prerequisites ​

  • Windows 10 or later
  • Administrator access to your Windows system
  • An internet connection

Step 1: Enable Windows Subsystem for Linux (WSL) ​

  1. Open PowerShell as Administrator by right-clicking the Start button, selecting "Windows PowerShell (Admin)".

  2. To enable the WSL feature, run:

    powershell
    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  3. To enable the Virtual Machine Platform feature, run:

    powershell
    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  4. Restart your computer to complete the WSL install and update to WSL 2.

  5. Download and install the Linux kernel update package from the official Windows Store.

  6. Set WSL 2 as your default version:

    powershell
    wsl --set-default-version 2

:::warnings You need to use WSL v2. WSL v1 is not supported. :::

Step 2: Install the Composabl WSL Image ​

Now WSL works, you can install the Composabl WSL image. This image contains everything you need to work with Composabl and is based of the LTS Ubuntu release, containing Python, Docker and other required prerequisites for Composabl.

💡 If you prefer to install everything manually, you can follow the steps below.

  1. Download the Composabl WSL image from the Composabl website.
  2. Import the image into WSL using the following command:
powers
# wsl --import Composabl <<install location>> <path to the image>
wsl --import Composabl C:\Users\<<username>>\Composabl C:\Users\<<username>>\Downloads\composabl-wsl.tar.gz

# Check if it was installed
wsl --list --verbose

# Open the Composabl WSL
wsl -d Composabl

💡If you want to remove it, you can simply run wsl --unregister Composabl

Environment Setup - Windows (WSL) - Manual ​

Prerequisites ​

  • WSL 2 enabled on your Windows system (see above)

Step 1: Install a Linux Distribution ​

  1. Open the Microsoft Store and search for your preferred Linux distribution (e.g., Ubuntu, Debian, Fedora).

  2. Select your distribution and click "Get" or "Install" to download and install it.

  3. Once installed, launch the distribution from the Start menu, and follow the prompts to set up your user account and password.

Step 2: Install Python 3.10 in WSL ​

  1. Update your Linux distribution's package lists:

    bash
    sudo apt update
  2. Upgrade your distribution's packages:

    bash
    sudo apt upgrade
  3. Install Python 3.10:

    bash
    sudo apt install python3.10
  4. Verify the installation:

    bash
    python3.10 --version

Step 3: Install Docker Desktop for Windows ​

  1. Download Docker Desktop for Windows from the official Docker website.

  2. Run the installer and follow the on-screen instructions.

  3. After installation, Docker Desktop will ask to log out and log back in, or to restart your computer to complete the WSL 2 setup.

Step 4: Configure Docker with WSL ​

  1. Open Docker Desktop.

  2. Go to Settings > Resources > WSL Integration.

  3. Enable integration with your installed Linux distribution.

  4. Docker commands can now be run from your WSL distribution's terminal.

Step 5: Verify Docker Installation ​

To verify that Docker is working correctly with WSL, open your Linux distribution terminal and run:

bash
docker run hello-world

This command will download a test image and run it in a container. If the container runs successfully, it confirms that Docker is installed and working correctly.