Setup for Windows
  • 21 May 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

Setup for Windows

  • Dark
    Light
  • PDF

Article summary

Git setup

Depending on the operating system, Git may already be installed.

To determine if it is installed, run: git --version

  • If the response is a git version, then it is already installed.

  • If it is not installed, follow the steps below to install it.

Download the git installer here: https://git-scm.com/download/win

Python and Node

This setup also helps you achieve deterministic builds and an overall more consistent work environment. You won’t have to manually manage the Python virtualenv locations and names anymore. For Node, global packages are installed based on the version.

The setup makes use of pyenv and nvm, which are version managers for Python and Node respectively. You can think of these tools as scripts that dynamically modify your path environment variable as you switch versions, ensuring that version locations and directories are cleanly separated and that the right version is called when you run python or node in a given directory.

Note: This process refers to python and python3. Before attempting these steps, determine which of these your environment uses and then follow the corresponding instructions.

Python

To set up your environment for Python on Windows, you must set up Windows Subsystem for Linux (WSL) and then follow the Linux Ubuntu/Debian instructions.

Node

Complete the following steps to set up your environment for Node and nvm.

  1. Install nvm:

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
    wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
  2. Restart your shell for changes to take effect.
    exec "$SHELL"

  3. Install a node version and set it as the global default.
    nvm install 18.16.0
    nvm alias default 18.16.0

  4. Add deeper shell integration using the instructions in GitHub's nvm Deeper Shell Integration documentation. With this functionality, when you change directories the node version switches automatically to match the new directory.

  5. Enable Node Corepack so you can use the latest version of Yarn.
    corepack enable

Yarn setup

Depending on the operating system, Yarn may already be installed.

To determine if it is installed, run: yarn --version

  • If the response is a version, then it is already installed.

  • If it is missing, ensure you have installed Node.

    • If Node is installed, and Yarn is not, install it by running: npm install --global yarn

For more detailed instructions on installing Yarn, refer to the Yarn documentation.


Was this article helpful?