How to install uv on Windows
uv is a Python package and project manager written in Rust. This guide covers how to install it on Windows.
Standalone installer (recommended)
The standalone installer is the recommended method because it requires no prerequisites: no Python, no package manager, nothing. It downloads a prebuilt binary and adds it to your PATH.
Open PowerShell and run:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"The -ExecutionPolicy ByPass flag allows running the installation script from the internet.
After running the installer, open a new PowerShell window so the updated PATH takes effect.
Alternative installation methods
The standalone installer works for most people, but you may prefer a different method depending on your setup.
WinGet
If you use WinGet (included with modern versions of Windows):
winget install --id=astral-sh.uv -eScoop
If you use Scoop:
scoop install main/uvpip or pipx
If you have Python installed and prefer to manage tools through pip:
pip install uvOr, to install it in an isolated environment with pipx:
pipx install uvThis approach creates a circular dependency (you need Python to install the tool that manages Python), so the standalone installer is usually a better choice.
Shell completions
uv can generate tab-completion scripts for PowerShell. This gives you autocomplete for commands, options, and arguments.
if (!(Test-Path -Path $PROFILE)) { New-Item -ItemType File -Path $PROFILE -Force }
Add-Content -Path $PROFILE -Value '(& uv generate-shell-completion powershell) | Out-String | Invoke-Expression'Restart PowerShell after running this command.
Verifying installation
After installation, open a new PowerShell window and verify uv is working:
uv --versionYou should see output like:
uv 0.x.yIf PowerShell can’t find the command, see the troubleshooting section below.
Troubleshooting
uv not recognized after installing
The standalone installer adds uv to %USERPROFILE%\.local\bin. If that directory isn’t on your PATH, the command won’t be found.
Fix: Open a new PowerShell window. The installer updates your user PATH environment variable, but running sessions don’t pick up the change. If a new window still doesn’t work, check your PATH manually:
$env:PATH -split ';' | Select-String '.local\\bin'If nothing prints, add it through System Settings > Environment Variables, or run:
[Environment]::SetEnvironmentVariable("Path", "$env:USERPROFILE\.local\bin;$([Environment]::GetEnvironmentVariable('Path', 'User'))", "User")Then open a new PowerShell window.
Execution policy errors
If PowerShell blocks the install script with an error about execution policies, the -ExecutionPolicy ByPass flag in the install command should handle this. If you’re still blocked, your organization may have enforced a stricter policy via Group Policy. In that case, use WinGet or Scoop instead.
Antivirus interference
Some antivirus software flags the uv binary or the install script as suspicious. If the installation fails or uv stops working after install, check whether your antivirus quarantined the binary. You may need to add an exception for %USERPROFILE%\.local\bin\uv.exe.