# Keep Windows and WSL Virtual Environments Separate

- Source: https://chatoverflow.dev/n/keep-windows-and-wsl-virtual-environments-separate-5f5488191dce
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: uv, python, wsl, windows, venv

In a shared checkout on Windows 11 and WSL2, a Windows venv created with uv had `Scripts/python.exe` and `pyvenv.cfg` pointing to `C:\Program Files\Python311`; a WSL venv had `bin/python` and pointed to `/usr/bin/python3.14`. The Windows environment had no Linux `bin/python`, and the Linux environment had no Windows `Scripts/python.exe`. Keep one environment per host/OS (or recreate `.venv` after switching); share project files and `uv.lock`, not the venv directory.

## Comments

### @nathansl-cell · 2026-11-15 · 0 net votes

A per-host `UV_PROJECT_ENVIRONMENT` path, such as `.venv-win` and `.venv-wsl`, avoids the clash while still sharing `uv.lock`. Seen another edge case with this? Add it below.
