You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hub/dev-environment/python.md
+21-14Lines changed: 21 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,39 +2,46 @@
2
2
title: Python on Windows for beginners
3
3
description: A guide to help you get started if your brand new to using Python on Windows.
4
4
ms.topic: get-started
5
-
ms.date: 07/03/2025
5
+
ms.date: 03/23/2026
6
6
ms.custom: copilot-scenario-highlight
7
7
---
8
8
9
9
# Set up your Python development environment on Windows
10
10
11
-
Get your Python environment ready on Windows in minutes — set it up manually or automate everything with winget. You'll need the following:
11
+
Get your Python environment ready on Windows in minutes — install from the command line with winget or set it up manually. You'll need the following:
12
12
13
-
-**Python 3.13** – The latest Python runtime
13
+
-**Python** – The current stable Python runtime (3.14 or later)
14
14
-**Visual Studio Code** – A lightweight, powerful code editor
15
15
-**Python extension for Visual Studio Code** – Adds Python language support, debugging, linting, and more
16
16
17
-
#### [WinGet Configuration](#tab/winget)
17
+
#### [WinGet](#tab/winget)
18
18
19
-
The [WinGet configuration file](https://aka.ms/python-config) below installs everything listed above automatically.
19
+
1. Open PowerShell in Windows Terminal and install Python:
20
20
21
-
To get started:
21
+
```powershell
22
+
winget install Python.Python.3.14
23
+
```
22
24
23
-
1. Open PowerShell in Windows Terminal and run the following command:
25
+
2. Install Visual Studio Code:
24
26
25
27
```powershell
26
-
winget configure -f https://aka.ms/python-config
28
+
winget install Microsoft.VisualStudioCode
27
29
```
28
-
2. When the configuration starts, a terminal window shows the setup steps and required installs. Review them, then confirm by selecting [Y] Yes or [N] No to continue.
29
30
30
-
3. The required workloads are installed. Verify your setup by running `python --version`.
31
+
3. Close and reopen PowerShell, then verify Python is installed:
32
+
33
+
```powershell
34
+
python --version
35
+
```
36
+
37
+
4. Open VS Code and install the [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) from the VS Code Marketplace.
31
38
32
39
You're now ready for Python development.
33
40
34
41
35
42
#### [Manual installation](#tab/manual)
36
43
37
-
1. **Install Python 3.13**: Install [Python 3 from the Microsoft Store](https://apps.microsoft.com/search?query=python). The Microsoft Store version automatically configures your PATH and provides automatic updates. Once installed, open PowerShell and run `python --version` to verify.
44
+
1. **Install Python**: Install [Python from the Microsoft Store](https://apps.microsoft.com/search?query=python). The Microsoft Store version automatically configures your PATH and provides automatic updates. Once installed, open PowerShell and run `python --version` to verify.
38
45
39
46
2. **Install Visual Studio Code**: Download and install [Visual Studio Code](https://code.visualstudio.com).
40
47
@@ -53,7 +60,7 @@ You're now ready for Python development.
53
60
>
54
61
> A common cause for trouble is trying to install into a location that you do not have permission to modify. For example, the default install location might require Administrative privileges, but by default Python will not have them. The best solution is to create a [virtual environment](https://docs.python.org/3/tutorial/venv.html) and install there.
55
62
>
56
-
> Some packages include native code that requires a C or C++ compiler to install. In general, package developers should publish pre-compiled versions, but often do not. Some of these packages might work if you [install Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) and select the C++ option, however in most cases you will need to contact the package developer.
63
+
> Some packages include native code that requires a C or C++ compiler to install. In general, package developers should publish pre-compiled versions, but often do not. Some of these packages might work if you [install Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio) and select the C++ option, however in most cases you will need to contact the package developer.
57
64
>
58
65
> [Follow the discussion on StackOverflow](https://stackoverflow.com/questions/4750806/how-do-i-install-pip-on-windows/12476379)
59
66
@@ -133,7 +140,7 @@ You're now ready for Python development.
133
140
134
141
<details><summary>What if I need to work across different machines?</summary>
135
142
136
-
> [Settings Sync](https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync) allows you to synchronize your VS Code settings across different installations using GitHub. If you work on different machines, this helps keep your environment consistent across them.
143
+
> VS Code has built-in [Settings Sync](https://code.visualstudio.com/docs/configure/settings-sync) that lets you share your settings, keybindings, extensions, and more across machines using your GitHub or Microsoft account. No extension needed.
137
144
138
145
</details>
139
146
@@ -156,4 +163,4 @@ You're now ready for Python development.
156
163
> - [Debugging Python](https://code.visualstudio.com/docs/python/debugging): Debugging is the process of identifying and removing errors from a computer program. This article covers how to initialize and configure debugging for Python with VS Code, how to set and validate breakpoints, attach a local script, perform debugging for different app types or on a remote computer, and some basic troubleshooting.
157
164
> - [Unit testing Python](https://code.visualstudio.com/docs/python/unit-testing): Covers some background explaining what unit testing means, an example walkthrough, enabling a test framework, creating and running your tests, debugging tests, and test configuration settings.
0 commit comments