Goals of this page #
- Install Python 3.13 on Windows 11 / 10
- Create and manage a virtual environment with
uvandvenv - Learn typical stumbling blocks and how to solve them
Prerequisites #
| Item | Details |
|---|---|
| Privileges | Standard user is fine (we temporarily allow scripts with Set-ExecutionPolicy) |
| Shell | Windows PowerShell (search “PowerShell” from the Start menu) |
| Working folder | We will use C:\projects\my-app as an example (feel free to change it) |
1. Install Python 3.13 #
Download the
Windows installer (64-bit)from the official pageRun the installer and tick “Add python.exe to PATH” on the first screen → click
Install NowVerify the version in PowerShell
py -3.13 --versionIf
Python 3.13.xappears, you are set. Ifpyis 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.pyautomatically uses the environment.
4. Manage libraries #
uv pip install numpy pandas
uv pip list
uv pip sync requirements.txt
uv pip install: add packagesuv pip list: check what is installeduv pip sync: recreate the environment fromrequirements.txt
5. Configure Visual Studio Code (optional) #
- Open VS Code and choose the Python interpreter from the status bar
- Point it to
.venv\Scripts\python.exeto enable completion and debugging inside the environment - Install extensions such as “Python”, “Pylance”, or “Black Formatter” for a smoother workflow
6. Common issues and fixes #
| Issue | Fix |
|---|---|
Set-ExecutionPolicy is denied | Confirm with your administrator or run PowerShell “as administrator” |
uv command not found | Reopen PowerShell / add $Env:USERPROFILE\.local\bin to PATH |
Cannot delete .venv | Ensure 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
.venvfolder - 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.