Set up Python 3.13 and uv on Windows

Basic python

Set up Python 3.13 and uv on Windows

Goals of this page #

  • Install Python 3.13 on Windows 11 / 10
  • Create and manage a virtual environment with uv and venv
  • Learn typical stumbling blocks and how to solve them

Prerequisites #

ItemDetails
PrivilegesStandard user is fine (we temporarily allow scripts with Set-ExecutionPolicy)
ShellWindows PowerShell (search “PowerShell” from the Start menu)
Working folderWe will use C:\projects\my-app as an example (feel free to change it)

1. Install Python 3.13 #

  1. Download the Windows installer (64-bit) from the official page

  2. Run the installer and tick “Add python.exe to PATH” on the first screen → click Install Now

  3. Verify the version in PowerShell

    py -3.13 --version
    

    If Python 3.13.x appears, you are set. If py is not recognised, close and reopen PowerShell.

💡 You can also run winget install Python.Python.3.13, but double-check the PATH setting afterwards.

2. Install uv #

uv is a fast package manager. Run the following commands in PowerShell:

Set-ExecutionPolicy -Scope Process Bypass
iwr https://astral.sh/uv/install.ps1 -UseBasicParsing | iex
uv --version

If the version is printed, the installation succeeded. Otherwise, reopen PowerShell or ensure $Env:USERPROFILE\.local\bin is in PATH.

3. Create a project folder and virtual environment #

mkdir C:\projects\my-app
cd C:\projects\my-app
uv venv --python 3.13 .venv

This creates a .venv folder containing the environment. Activate it with:

.\.venv\Scripts\Activate.ps1

When you see (.venv) in the prompt, the environment is active. Type deactivate to exit.

✅ You can also run commands without activating: uv run python script.py automatically uses the environment.

4. Manage libraries #

uv pip install numpy pandas
uv pip list
uv pip sync requirements.txt
  • uv pip install: add packages
  • uv pip list: check what is installed
  • uv pip sync: recreate the environment from requirements.txt

5. Configure Visual Studio Code (optional) #

  1. Open VS Code and choose the Python interpreter from the status bar
  2. Point it to .venv\Scripts\python.exe to enable completion and debugging inside the environment
  3. Install extensions such as “Python”, “Pylance”, or “Black Formatter” for a smoother workflow

6. Common issues and fixes #

IssueFix
Set-ExecutionPolicy is deniedConfirm with your administrator or run PowerShell “as administrator”
uv command not foundReopen PowerShell / add $Env:USERPROFILE\.local\bin to PATH
Cannot delete .venvEnsure VS Code or other tools are not using it, then restart and delete

7. Clean-up #

  • Leave the environment: deactivate
  • Delete the environment: remove the .venv folder
  • Save package information: uv pip freeze > requirements.txt

You now have Python 3.13 + uv ready on Windows. When you are comfortable, explore the guides for other systems as well:

When you’re ready, move on to the next lesson to start learning Python.