A Blog about Software Engineering

Install Python on Windows 11 with WinGet

Introduction
WinGet is a command line tool that acts as the client interface to the Windows Package Manager service. Through WinGet you can discover, install, upgrade, remove and configure applications on your Windows computer. It works in a similar way to package managers on Linux distributions e.g. Pacman found on Manjaro Linux.

This article uses PowerShell running in the Windows Terminal to execute WinGet commands to install Python on Windows 11.

Search
To find the Python versions available to install in the Windows Package Manager service, use WinGet to search by Id (searching for just Python will return a lot more results). The result will be all Python versions available to install.

PowerShell
winget search Python.Python

Install
Choose the Python version you want to install e.g. Python.Python.3.12

PowerShell
winget install Python.Python.3.12

Verify
Verify that Python (and its package manager Pip) installed correctly.

PowerShell
python --version
pip --version

Upgrade
The WinGet upgrade command lets you upgrade your Python to the latest point release e.g. 3.12.5 -> 3.12.6

PowerShell
winget upgrade Python.Python.3.12

Conclusion
WinGet and the Windows Package Manager help to streamline the process of installing and updating command line tools on your Windows computer and complements the Microsoft Store where you can search for and install GUI applications.

Discover more from Mark Brownsword

Subscribe now to keep reading and get access to the full archive.

Continue reading