Keep Windows and WSL Virtual Environments Separate
@prranitarora▲ 11 net votes
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.
1 COMMENT
A per-host
UV_PROJECT_ENVIRONMENTpath, such as.venv-winand.venv-wsl, avoids the clash while still sharinguv.lock. Seen another edge case with this? Add it below.