The best way to install Python through Windows Command Prompt will be through Chocolatey (Windows Package Manageer).

Steps to install python 3 will be as follows :-

  1. Open CMD using 'Run as Administrator'.

  2. Download and Install Chocolatey using the following command.

Copy@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
  1. Download and install python using the following command.
choco install -y python3
  1. You can check the version to verify if Python was successfully installed as follows.
Copypython --version
Answer from Cyborg on Stack Overflow
Top answer
1 of 6
33

The best way to install Python through Windows Command Prompt will be through Chocolatey (Windows Package Manageer).

Steps to install python 3 will be as follows :-

  1. Open CMD using 'Run as Administrator'.

  2. Download and Install Chocolatey using the following command.

Copy@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
  1. Download and install python using the following command.
choco install -y python3
  1. You can check the version to verify if Python was successfully installed as follows.
Copypython --version
2 of 6
22

You could download the setup you want to install and then install it automatically without using the setup's UI:

Copy[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Invoke-WebRequest -Uri "https://www.python.org/ftp/python/3.7.0/python-3.7.0.exe" -OutFile "c:/temp/python-3.7.0.exe"

c:/temp/python-3.7.0.exe /quiet InstallAllUsers=0 InstallLauncherAllUsers=0 PrependPath=1 Include_test=0

I don't think it will work without admin privileges though, I tried using InstallAllUsers=0 to install it only for the current user but it is still asking for elevation.

There are some options you can use when installing it this way, here is the doc: https://docs.python.org/3.6/using/windows.html#installing-without-ui

🌐
Microsoft Learn
learn.microsoft.com › en-us › windows › dev-environment › python
Python on Windows for beginners | Microsoft Learn
April 15, 2026 - Install Python: Install Python from the Microsoft Store. The Microsoft Store version automatically configures your PATH and provides automatic updates. Once installed, open PowerShell and run python --version to verify.
Discussions

Install python with a script or powershell
Im looking for some help with an install script. We want to push out python to end users in the background via powershell or script. Has anyone had any success with it? More on discuss.python.org
🌐 discuss.python.org
1
0
January 24, 2024
Installing Python with powershell
howdy Not_A_MadScientist, even if you don't want to use choco for some reason, you can use their code as a template for your own. they support using an internal source, so they otta be able to be a handy example, at least. take care, lee More on reddit.com
🌐 r/PowerShell
7
7
May 22, 2018
Powershell cant run Python
All you have to do is add your python path to the environment variables and it should work fine. When you install python it should ask if you want to add python to environment variables/path and it should work. More on reddit.com
🌐 r/learnpython
48
36
November 12, 2018
Git Bash/PowerShell versus downloading Python for Windows
It doesn't really matter, my personal preference nowadays is to just run winget install python.python.3.11 in PowerShell and call it a day. More on reddit.com
🌐 r/learnpython
3
1
January 20, 2024
🌐
DEV Community
dev.to › jajera › install-python-on-windows-via-cli-winget-3lnm
Install Python on Windows via CLI (winget) - DEV Community
September 23, 2025 - Setting up Python on Windows no ... install Python 3 in seconds, entirely from the terminal. Press Win + X → select Windows PowerShell (Admin) or Terminal (Admin)....
🌐
GitHub
gist.github.com › raoshaab › de861c353ab0e0cb77f8afd5325e43c1
Install Python 3 with powershell in windows 10 - Gist - GitHub
# Define the target installation directory i.e $installDir = "D:\newfolder\python3" $installDir = "D:\Python3" # Install Python with specified installation directory Start-Process -FilePath $pythonInstaller -ArgumentList "/quiet PrependPath=1 TargetDir=$installDir" -Wait
🌐
Python
docs.python.org › 3 › using › windows.html
4. Using Python on Windows — Python 3.14.6 documentation
To install the file downloaded from python.org, either double-click and select “Install”, or run Add-AppxPackage <path to MSIX> in Windows Powershell.
🌐
Real Python
realpython.com › installing-python
How to Install Python on Your System: A Guide – Real Python
February 18, 2026 - After you’ve selected the Python Install Manager app, follow these steps to complete the installation: Click the Get button. Wait for the app to download. Click the Open button. When you click the Open button, you’ll be presented with a terminal window. Follow the on-screen instructions to complete the installation. Once the installation is complete, open Windows PowerShell and run the python --version command to confirm that Python is installed on your machine.
🌐
Python.org
discuss.python.org › python help
Install python with a script or powershell - Python Help - Discussions on Python.org
January 24, 2024 - Im looking for some help with an install script. We want to push out python to end users in the background via powershell or script. Has anyone had any success with it?
Find elsewhere
🌐
Hexnode
hexnode.com › mobile-device-management › help › script-to-install-python-on-windows-devices
Script to install Python on Windows devices - Hexnode Help Center
May 14, 2024 - This PowerShell script begins by defining variables for the desired Python version and its download URL. The placeholder “version” can be replaced with the specific version number needed. Subsequently, the script defines the installation directory path. Utilizing the Invoke-WebRequest cmdlet, the script downloads the Python installer from the specified URL and saves it in a temporary directory.
🌐
Soldering Mind
solderingmind.com › home › basic electronics › installing python on windows powershell
Installing and Using Python on Windows PowerShell
July 5, 2024 - After that you will see the interface like given in the figure given below. ... Install Python on your Windows computer by downloading the installer from the official Python website (https://www.python.org/downloads/).
🌐
Reddit
reddit.com › r/powershell › installing python with powershell
r/PowerShell on Reddit: Installing Python with powershell
May 22, 2018 -

I am playing around with powershell and looking for a way to efficiently install versions of Python with powershell I am trying to make this fully automated. I want to install Python without using chocolately. I did have some code that would grab the binaries and install them.

But I am looking for any other code to optimize my code

Any help is appreciated. Thanks!

🌐
Built In
builtin.com › software-engineering-perspectives › how-to-install-python-on-windows
How to Install Python on Windows | Built In
Running the “command sudo apt install python3” in Powershell. | Image: Jim Clyde Monge · To verify the installation, run the command python3 --version in the command prompt. How to install Python on Windows 10 and 11.
🌐
YouTube
youtube.com › watch
how to install python using powershell - YouTube
Download this code from https://codegive.com Certainly! Installing Python using PowerShell is a straightforward process. Follow the steps below to install Py...
Published   December 28, 2023
🌐
Arunrocks
arunrocks.com › guide-to-install-python-or-pip-on-windows
An Easy Guide to Install Python or Pip on Windows · Arunrocks
December 30, 2013 - The video and the high-level transcript follows: ... Download the MSI installer from http://www.python.org/download/. Select 32 bit or 64 bit based on the System Settings which opens by pressing Win+Break · Run the installer.
🌐
Dataquest
dataquest.io › blog › installing-python-on-windows
How to Install Python on Windows, from Downloading to Running Scripts (2022)
March 14, 2025 - To do so, open the command line application Command Prompt (in Windows search, type cmd and press Enter) or Windows PowerShell (right-click on the Start button and select Windows PowerShell) and type there python -V.
🌐
Coding for Entrepreneurs
codingforentrepreneurs.com › guides › install-python-on-windows
Install Python on Windows - Coding for Entrepreneurs
Coding for Entrepreneurs · Learn · Enroll · Courses · Suggestions · Shorts · Community · Testimonials · Connect
🌐
Delft Stack
delftstack.com › home › howto › powershell › install python with powershell
How to Install Python With PowerShell | Delft Stack
February 2, 2024 - This article will discuss how to install Python manually through a package manager called Chocolatey. Before proceeding, ensure that any external scripts we run are correctly signed. To do this, we will use the RemoteSigned execution policy to set the permission for the current user. This approach prevents the permissions from becoming as broad as they would be with Unrestricted permission while enabling PowerShell to accept downloaded scripts that we trust. ... Once we press the Enter key, click Yes or Yes to All and allow the changes to take effect.
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-install-python-3-and-set-up-a-local-programming-environment-on-windows-10
How To Install Python 3 and Set Up a Local Programming Environment on Windows 10 | DigitalOcean
July 12, 2022 - Allow PowerShell to install Chocolatey. Once it is fully installed, we can begin installing additional tools with the choco command. If we need to upgrade Chocolatey at any time in the future, we can run the following command: ... With our package manager installed, we can go on to install the rest of what we need for our Python ...
🌐
Psu-psychology
psu-psychology.github.io › psy-525-reproducible-research-2020 › how_to › install-python.html
Installing Python
March 6, 2020 - This will open an interactive Python ... used Homebrew to install Python on Mac OS or the Python.org installer on Windows, you can use the pip package manager to install packages....
🌐
Copdips
copdips.com › 2018 › 06 › install-python-on-windows-with-powershell-without-administrator-privileges.html
Install Python on Windows with Powershell without administrator privileges - A code to remember
June 26, 2018 - # To install Python 3 > Install-Package python -Scope CurrentUser # To install Python 2 > Install-Package python2 -Scope CurrentUser ... Current Find-Package python* -AllVersion gives the lastest python version is v3.7.0, but this version doesn't work, the last worked Nuget python version is v3.6.6 · I will show you the way to add Python3 into the user PATH, it will be the same way for Python2. I use the user PATH because I'm not admin on the Windows server, I cannot modify the system PATH.