Windows 2022
Sponsored Link

Python : Install2022/01/26

 
Install Python for Windows.
[1] Run PowerShell with Admin Privilege and Install.
Make sure the version of Python you'd like to install on the official site below.
⇒ https://www.python.org/downloads/
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# download
PS C:\Users\Administrator> Invoke-WebRequest -Uri "https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe" -OutFile "python-3.10.2-amd64.exe" 

# install (to System Wide + set PATH)
PS C:\Users\Administrator> .\python-3.10.2-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0 

# installation processes are running
PS C:\Users\Administrator> Get-Process -Name "py*", "setup*" 

Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
    187      14     2564      10240       0.06   1444   0 python-3.10.2-amd64
    361      26     7228      23328       0.83   1976   0 python-3.10.2-amd64
    244      18     3700      13356       4.27   3612   0 python-3.10.2-amd64

# after finishing installation, processes above finish
PS C:\Users\Administrator> Get-Process -Name "py*", "setup*" 


# reload environment variables
PS C:\Users\Administrator> $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") 

PS C:\Users\Administrator> python -V 
Python 3.10.2
Python : Install (GUI)
 
On GUI Installation, set like follows.
[2] Double Click the Installer you downloaded from the official site.
[3] Check a box [Add Python ** to PATH] to add Python Path to environment bariables.
For install option, if you select [Install Now], Python will be installed only for the current user.
On this example, we install Python for all user, so select [Customize installation].
[4] Click the [Next] button.
[4] Check a box [Install for all users] and click [Install] button.
[5] After finishing installation, click [Close] button.
[6] Run PowerShell and execute [python] command to verify installation.
Matched Content