# How to install uv on Windows


[uv](https://pydevtools.com/handbook/reference/uv.md) is a fast Python package and project manager. 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
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):

```powershell
winget install --id=astral-sh.uv -e
```

### Scoop

If you use Scoop:

```powershell
scoop install main/uv
```

### pip or pipx

If you have Python installed and prefer to manage tools through pip:

```powershell
pip install uv
```

Or, to install it in an isolated environment with [pipx](https://pydevtools.com/handbook/reference/pipx.md):

```powershell
pipx install uv
```

This 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.

```powershell
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:

```powershell
uv --version
```

You should see output like:

```
uv 0.x.y
```

If 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:

```powershell
$env:PATH -split ';' | Select-String '.local\\bin'
```

If nothing prints, add it through System Settings > Environment Variables, or run:

```powershell
[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`.

## Learn More

- [uv: A Complete Guide](https://pydevtools.com/handbook/explanation/uv-complete-guide.md) covers what uv does, how fast it is, the core workflows, and recent releases.
- [How to use uv on Windows ARM64](https://pydevtools.com/handbook/how-to/how-to-use-uv-on-windows-arm64.md) covers the native aarch64 build and when to switch off the default emulated x86_64 Python
- [uv reference page](https://pydevtools.com/handbook/reference/uv.md)
- [uv official installation guide](https://docs.astral.sh/uv/getting-started/installation/)
- [Create your first Python project](https://pydevtools.com/handbook/tutorial/create-your-first-python-project.md)
- [How to upgrade uv](https://pydevtools.com/handbook/how-to/how-to-upgrade-uv.md)
