This article explains how to install Python on Windows 11, configure it, and use it. We’ll install it using Chocolatey from PowerShell. Python is widely adopted in programming education and is used by a wide range of users from beginners to professional programmers, making it one of the most popular programming languages both domestically and internationally.
In this article, we’ll install Python using Chocolatey.
<>
With Choco on Windows and Windows 11, you can install various programs and utility software used in programming, such as programming languages, development environments, libraries, and software, using shortcuts.
If you know how to use Choco, you can check the programs you want to install from Choco’s website database and install them by command,
Install Chocolatey on Windows 11. Open PowerShell with administrator privileges and run the following command. To open PowerShell with administrator privileges, right-click the PowerShell icon in the taskbar, right-click again, and select “Run as administrator”.
> Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
If the following is displayed, the installation has completed successfully.
“Chocolatey (choco.exe) is now ready”

To ensure the installation was successful, check the version output.
> choco --version
0.11.3
Run the refreshenv command.
> refreshenv
Refreshing environment variables from registry for cmd.exe. Please wait...Finished..
At this point, various programming languages, development environments, libraries, and software available through Choco can be installed.
Now we’ll install Python using Choco.
Install Python with the following command.
> choco install python -y
> choco install python -y
Chocolatey v0.11.3
Installing the following packages:
python
By installing, you accept licenses for the packages.
Progress: Downloading python3 3.10.0... 100%
Progress: Downloading vcredist2015 14.0.24215.20170201... 100%
Progress: Downloading vcredist140 14.29.30135... 100%
Progress: Downloading KB3033929 1.0.5... 100%
Progress: Downloading chocolatey-windowsupdate.extension 1.0.4... 100%
Progress: Downloading KB3035131 1.0.3... 100%
Progress: Downloading KB2919355 1.0.20160915... 100%
Progress: Downloading KB2919442 1.0.20160915... 100%
Progress: Downloading KB2999226 1.0.20181019... 100%
Progress: Downloading python 3.10.0... 100%
chocolatey-windowsupdate.extension v1.0.4 [Approved]
Python installation is complete at this point, but note that you must restart the console before the commands become available. For example, if you’re running powershell.exe, close that window and open a new one. If you’re using ConEmu, close ConEmu and open a new one. Alternatively, you can open a new instance without any issues.
If you run it in the same console window, you’ll get an error like this:
> python --version
python : The term 'python' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
On a new console instance command line, check the Python version with the following command.
> python --version
Python 3.10.0
To check the installed folder and path, run the Get-Command command as follows. You can confirm it’s installed in the path (folder) C:\Python310\python.exe.
> Get-Command python
CommandType Name Version Source
----------- ---- ------- ------
Application python.exe 3.10.15... C:\Python310\python.exe
Let’s try Hello World with Python.
> python -c "print(`'Hello World...`')"
Hello World...
Note that the above command is for execution in PowerShell. It will probably error in WSL Bash or cmd.exe because the escape sequences are different. (Example below)
# python -c "print(`'Hello World...`')"
File "<string>", line 1
print(`'Hello World...`')
^
SyntaxError: invalid syntax
