WinGet Python: Install Python on Windows
Install Python on Windows directly with the Windows Package Manager (WinGet) command. This can be done directly through the Windows Terminal or PowerShell without downloading the Python installer from the Web or visiting the Microsoft Windows Store.
Search WinGet for the Python Package
You can easily search for Python packages available for installation on Windows with the winget search command, this will list the available Python packages and their versions.
Install Python with WinGet
To install Python on Windows, you can use the Windows Package Manager (WinGet) install command.
This command will go through the downloading and full installation of Python once the installation is complete, run the following command to refresh the Windows $env:Path variable, which will give us Terminal access to the Python executable.
We can also check the source of python.exe by running the PowerShell Get-Command.
Once the $env:Path variable is refreshed, you can directly call python.exe from the terminal to open a Python IDLE shell.
We also want to make sure that pip.exe is installed and accessible. This important application is responsible for Python package management. Run the PowerShell Get-Command on this application as well.
To check the version of pip, we can use the pip --version command.
Once you have verified the Python IDLE environment, Python pip, and have access to the python.exe and pip.exe in your $env:Path variable you are ready to program with Python on Windows!
If you like what you see check out my other great blog articles!