# Fix 'uv' is not recognized on Windows


Windows displays `'uv' is not recognized as an internal or external command, operable program or batch file` when it cannot find [uv](https://pydevtools.com/handbook/reference/uv.md). The steps use Command Prompt; open it from the Start menu if the error appeared in PowerShell. Start by reopening the terminal so it can load the installer's settings.

## Try the quick fix

1. Close Command Prompt. If it is running inside Windows Terminal or VS Code, close that app too.
2. Open Command Prompt again.
3. Type this command and press Enter:

```batch
uv --version
```

Successful output has this form:

```console
uv [version] ([build details])
```

If the command prints a line beginning with `uv`, the problem is fixed. The installer updated your {{< term "path" "PATH" >}}, but the Command Prompt window you had open kept the old setting.

If the same error appears, check whether uv is installed.

## Check for the uv program

The standalone installer uses `%USERPROFILE%\.local\bin` by default. If you chose another install folder, open that folder instead and use it wherever the remaining steps show the default.

1. Open File Explorer.
2. Paste `%USERPROFILE%\.local\bin` into the address bar and press Enter.
3. Look for an application named `uv`. File Explorer may show its name as either `uv` or `uv.exe`.

If the application is there, skip to [add uv to PATH](#add-uv-to-path). If Windows cannot find the location, or the folder opens without the `uv` application, install uv first.

## Install uv when the file is missing

Open the Start menu, type **PowerShell**, and select **Windows PowerShell**. You do not need to run it as an administrator.

The following command downloads and runs uv's official installer. `-ExecutionPolicy ByPass` applies only to this command and does not change your permanent PowerShell settings.

Paste the command into PowerShell and press Enter:

```powershell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```

The installer prints `everything's installed!` when it finishes. Close PowerShell, open a new Command Prompt, and run:

```batch
uv --version
```

If the command prints a line beginning with `uv`, the installation worked. If Windows still reports the same error, continue to the next section.

## Add uv to PATH

By default, the standalone installer puts `uv.exe` in `%USERPROFILE%\.local\bin`. Windows searches the folders in `PATH` when you enter a command, so it cannot run uv until that folder is listed.

Test the fix in your current Command Prompt:

```batch
set "PATH=%USERPROFILE%\.local\bin;%PATH%"
uv --version
```

If the command now prints a line beginning with `uv`, add the folder permanently:

1. Open the Start menu and search for **Edit environment variables for your account**.
2. In the Environment Variables window, find **User variables for [your name]**. Select **Path**, then choose **Edit**.
3. Choose **New** and enter `%USERPROFILE%\.local\bin`.
4. Select **OK** in each open window.
5. Close Command Prompt, then open it again.

Run one final check:

```batch
uv --version
```

If the temporary `set "PATH=..."` command worked but this final check fails, reopen the Environment Variables window and confirm that `%USERPROFILE%\.local\bin` appears under your user `Path`. Close Windows Terminal or VS Code too if either app opens Command Prompt for you.

Do not install a second copy while File Explorer still shows the `uv` application. If the installer finishes without creating the application, use [the complete Windows installation guide](https://pydevtools.com/handbook/how-to/how-to-install-uv-on-windows.md) and choose one installation method.
