Skip to content

Instantly share code, notes, and snippets.

@zcemycl
Last active July 25, 2025 10:50
Show Gist options
  • Save zcemycl/46708e188ea7ae0b4f6ba56e2ccfa3d3 to your computer and use it in GitHub Desktop.
Save zcemycl/46708e188ea7ae0b4f6ba56e2ccfa3d3 to your computer and use it in GitHub Desktop.
Windows Setup to use WSL Ubuntu Pyenv Poetry

Install Ubuntu wsl2 in Windows

  1. Enable SVM in BIOs of your PC.
  2. Enable WSL in Windows.
  3. Update WSL to latest version such that it has manage option.
  4. Move WSL to your favorite Drive.
  5. Install Ubuntu via wsl --install Ubuntu-xx.xx.
  6. Install apt packages before getting pyenv.
    sudo apt-get install libssl-dev libffi-dev liblzma-dev python3-tk tk-dev libreadline-dev bzip2
    
  7. Install poetry.
    curl -sSL https://install.python-poetry.org | python3 -
    poetry --version
    
  8. Install pyenv.
    git clone https://github.com/pyenv/pyenv.git ~/.pyenv
    echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
    echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
    echo 'eval "$(pyenv init --path)"' >> ~/.bashrc
    source ~/.bashrc
    pyenv install 3.11.3
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment