Configuring LazyVim and Python on Windows with WSL

Prerequisites [OPTIONAL] Install a package manager - scoop You can use Scoop package manager to install various packages. If you want to skip this step, you can install WezTerm manually. Open a PowerShell terminal and type Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression Install a terminal - wezterm This step is necessary for displaying LazyVim and special icons appropriately. You have to use a terminal that supports LazyVim - wezterm. If you haven't installed scoop, you can just manually download and install WezTerm from here scoop bucket add extras scoop install extras/wezterm First steps - configuring WSL You can try to run LazyVim from Windows directly, but my experience is that it comes with plenty of tradeoffs and many features are currently broken. I'll try to give an explanation at the end of this article. Make sure you have WSL2 with latest stable Ubuntu LTS installed. wsl --list --online wsl --install -d Ubuntu-24.04 Start wsl wsl -d Ubuntu-24.04 Reference: https://learn.microsoft.com/en-us/windows/wsl/install Install command line prerequisites Install NeoVim latest stable sudo snap install nvim --classic Reference: https://github.com/neovim/neovim/blob/master/INSTALL.md#snap Install LazyGit LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | \grep -Po '"tag_name": *"v\K[^"]*') curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" tar xf lazygit.tar.gz lazygit sudo install lazygit -D -t /usr/local/bin/ Reference: https://github.com/jesseduffield/lazygit?tab=readme-ov-file#ubuntu Install gcc, make and other tools (required for nvim-treesitter and for installing python versions) sudo apt install build-essential \ dpkg-dev \ gcc \ gnupg \ libbluetooth-dev \ libbz2-dev \ libc6-dev \ libdb-dev \ libffi-dev \ libgdbm-dev \ liblzma-dev \ libncursesw5-dev \ libreadline-dev \ libsqlite3-dev \ libssl-dev \ make \ pkg-config \ tk-dev \ uuid-dev \ wget \ xz-utils \ zlib1g-dev Reference: https://github.com/docker-library/python/blob/0330f0baedb296c8806a869d04fe76838f721647/3.13/slim-bullseye/Dockerfile#L30 Install all other tools to work with fzf-lua. Required for LazyVim to effectively navigate in your project files. sudo apt install fzf ripgrep fdclone Install NodeJS with a version manager - nvm Mainly required for the builtin LazyVim package manager, called mason. curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash nvm install --lts nvm use --lts Check if it's working npm --version Reference: https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating Install pyenv to manage Python environments. Note, that uv is not supported currently as a Python provider. Also, uv does not allow you to use a specify Python version in your PATH. Follow this open GitHub issue for more information. curl https://pyenv.run | bash Change .bashrc to include pyenv features cat >> ~/.bashrc export PYENV_ROOT="$HOME/.pyenv" [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init - bash)" Install latest Python version and make it global pyenv install 3.13 pyenv global 3.13 Reference: https://github.com/pyenv/pyenv-installer?tab=readme-ov-file#install Ready to Roll!

Mar 25, 2025 - 09:12
 0
Configuring LazyVim and Python on Windows with WSL

Prerequisites

[OPTIONAL] Install a package manager - scoop

You can use Scoop package manager to install various packages. If you want to skip this step, you can install WezTerm manually. Open a PowerShell terminal and type

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression

Install a terminal - wezterm

This step is necessary for displaying LazyVim and special icons appropriately. You have to use a terminal that supports LazyVim - wezterm. If you haven't installed scoop, you can just manually download and install WezTerm from here

scoop bucket add extras
scoop install extras/wezterm

First steps - configuring WSL

You can try to run LazyVim from Windows directly, but my experience is that it comes with plenty of tradeoffs and many features are currently broken. I'll try to give an explanation at the end of this article.
Make sure you have WSL2 with latest stable Ubuntu LTS installed.

wsl --list --online
wsl --install -d Ubuntu-24.04

Start wsl

wsl -d Ubuntu-24.04

Reference: https://learn.microsoft.com/en-us/windows/wsl/install

Install command line prerequisites

Install NeoVim latest stable

sudo snap install nvim --classic

Reference: https://github.com/neovim/neovim/blob/master/INSTALL.md#snap

Install LazyGit

LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | \grep -Po '"tag_name": *"v\K[^"]*')
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf lazygit.tar.gz lazygit
sudo install lazygit -D -t /usr/local/bin/

Reference: https://github.com/jesseduffield/lazygit?tab=readme-ov-file#ubuntu

Install gcc, make and other tools (required for nvim-treesitter and for installing python versions)

sudo apt install build-essential \
  dpkg-dev \
  gcc \
  gnupg \
  libbluetooth-dev \
  libbz2-dev \
  libc6-dev \
  libdb-dev \
  libffi-dev \
  libgdbm-dev \
  liblzma-dev \
  libncursesw5-dev \
  libreadline-dev \
  libsqlite3-dev \
  libssl-dev \
  make \
  pkg-config \
  tk-dev \
  uuid-dev \
  wget \
  xz-utils \
  zlib1g-dev

Reference: https://github.com/docker-library/python/blob/0330f0baedb296c8806a869d04fe76838f721647/3.13/slim-bullseye/Dockerfile#L30

Install all other tools to work with fzf-lua. Required for LazyVim to effectively navigate in your project files.

sudo apt install fzf ripgrep fdclone

Install NodeJS with a version manager - nvm

Mainly required for the builtin LazyVim package manager, called mason.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash
nvm install --lts
nvm use --lts

Check if it's working

npm --version

Reference: https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating

Install pyenv to manage Python environments.

Note, that uv is not supported currently as a Python provider. Also, uv does not allow you to use a specify Python version in your PATH. Follow this open GitHub issue for more information.

curl https://pyenv.run | bash

Change .bashrc to include pyenv features

cat >> ~/.bashrc
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init - bash)"

Install latest Python version and make it global

pyenv install 3.13
pyenv global 3.13

Reference: https://github.com/pyenv/pyenv-installer?tab=readme-ov-file#install

Ready to Roll!