Last modified: Sep 28, 2026
Install Python with Winget: Easy Guide
Installing Python on Windows used to mean visiting the website, downloading an installer, and clicking through several screens. Now you can do it with one command. Winget is the official Windows Package Manager. It makes installing Python fast and repeatable.
This guide walks you through every step. You will learn how to search, install, verify, and update Python using winget. You will also learn how to fix common problems along the way.
What Is Winget?
Winget is a command-line tool built into modern Windows versions. It lets you install, update, and remove software from your terminal. Think of it as an app store for your command prompt.
It comes preinstalled on Windows 11 and recent Windows 10 builds. If you do not have it, you can install it from the Microsoft Store as App Installer.
Winget pulls packages from a trusted repository. That means you get official installers without hunting for download links.
Why Use Winget for Python?
There are several good reasons to use winget instead of a manual download.
First, it is fast. One command does everything. Second, it is repeatable. You can script it across many machines. Third, it keeps versions consistent, which matters for teams.
Winget also handles updates. You can upgrade Python later without leaving the terminal.
Before You Start
Check that winget is available. Open PowerShell or Command Prompt and run a simple version check.
winget --version
If you see a version number, you are ready. If you see an error, install App Installer from the Microsoft Store first.
You should also close any running Python programs. This avoids file locks during installation.
Step 1: Search for Python
Start by searching the winget repository. This shows you what is available.
winget search Python.Python
The output lists several packages. Each one matches a Python version.
Name Id Version
-------------------------------------------------------------
Python 3.13 Python.Python.3.13 3.13.1
Python 3.12 Python.Python.3.12 3.12.8
Python 3.11 Python.Python.3.11 3.11.9
Pick the version you need. Most beginners should choose the newest stable release.
Step 2: Install Python
Now install the package by its ID. This example installs Python 3.12.
winget install Python.Python.3.12
Winget downloads the installer and runs it. You may see a progress bar and a license agreement. Accept it to continue.
If you want to skip the agreement prompt, add the accept flag.
winget install Python.Python.3.12 --accept-package-agreements --accept-source-agreements
That flag is handy for automated setups. It tells winget to accept terms without asking.
Step 3: Verify the Installation
Close and reopen your terminal. This refreshes your environment variables.
Then check the Python version.
python --version
You should see something like this.
Python 3.12.8
You can also check pip, the package manager for Python.
pip --version
If both commands work, your installation is complete. You can now run Python scripts and install libraries.
Step 4: Run a Quick Test
Let us confirm everything works with a tiny script. Create a file called hello.py and add this code.
# A simple Python program
print("Hello from winget!")
Run it from your terminal.
python hello.py
You should see the following output.
Hello from winget!
If that worked, Python is fully set up on your machine.
Installing a Specific Python Version
Sometimes you need an older version. Maybe a project depends on it. Winget makes this easy too.
Just change the version in the package ID.
winget install Python.Python.3.10
Windows allows multiple Python versions side by side. You can switch between them using the py launcher.
py -3.10 --version
py -3.12 --version
This is useful when different projects need different versions.
Updating Python with Winget
Keeping Python updated is good practice. Updates bring security fixes and new features.
List available upgrades first.
winget upgrade
Then upgrade Python by its ID.
winget upgrade Python.Python.3.12
Winget handles the download and install for you. No manual steps needed.
Uninstalling Python
If you no longer need a version, remove it with winget.
winget uninstall Python.Python.3.12
This keeps your system clean and frees up disk space.
Common Problems and Fixes
Most issues are easy to solve. Here are the ones you are most likely to see.
Command not found: If python is not recognized, reopen your terminal. The PATH variable may not have refreshed yet.
Winget not found: Install App Installer from the Microsoft Store. This provides the winget command.
Permission errors: Run your terminal as Administrator. Some installs need elevated rights.
Version conflicts: Use the py launcher to pick a version. It avoids PATH confusion.
Tips for a Clean Setup
Add Python to your PATH during install if the option appears. Winget usually does this for you.
Use virtual environments for projects. Run python -m venv env to create one. This keeps dependencies separate.
Update pip regularly with python -m pip install --upgrade pip. It prevents many package errors.
Finally, keep winget itself updated. Run winget upgrade winget from time to time.
Conclusion
Installing Python with winget takes just a few minutes. You search, install, and verify with three simple commands. No browser downloads and no messy installers.
Winget also makes updates and removals easy. That keeps your development environment tidy and current. It is a skill worth learning for any Windows user.
Start with winget search Python.Python, pick your version, and install it. Then verify with python --version. You will be writing Python code in no time.