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
Installing Python with Powershell and "System" Account
Hi, I am doing my head in here. I have an installation script that works perfectly for everything through Windows Task Scheduler except Python. It uses the system account on the server to run this task. It doesn't error when installing Python, but what… More on learn.microsoft.com
🌐 learn.microsoft.com
2
0
April 2, 2023
I want to install python using a .exe but installation directory should be somewhere on D drive
https://docs.python.org/3/using/windows.html#installing-without-ui More on reddit.com
🌐 r/PowerShell
2
0
November 16, 2022
🌐
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.
🌐
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?
🌐
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.
Find elsewhere
🌐
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 - Press Win + X → select Windows PowerShell (Admin) or Terminal (Admin). ... Name Id Version ---------------------------------------- Python 3.13 Python.Python.3.13 3.13.7 Python 3.12 Python.Python.3.12 3.12.10 Python 3.11 Python.Python.3.11 ...
🌐
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 - This tutorial will guide you through installing Python 3 on your local Windows 10 machine and setting up a programming environment via the command line.
🌐
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!

🌐
DigitalOcean
digitalocean.com › community › tutorials › install-python-windows-10
How to Install Python on Windows | DigitalOcean
September 26, 2025 - Run the following command in Command Prompt or PowerShell: ... This command will install pip if it is missing. It is also good practice to keep pip updated by running: ... Yes, you can install multiple versions of Python on a single Windows system. The official installers are designed to coexist without interfering with each other. For example, you can have Python 3.8, 3.10, and 3.12 installed at the same time.
🌐
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.
🌐
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
🌐
Psu-psychology
psu-psychology.github.io › psy-525-reproducible-research-2020 › how_to › install-python.html
Installing Python
March 6, 2020 - I had good luck installing Python following the instructions on https://www.python.org/downloads/windows/. Again, I suggest you download the latest stable release (3.7.7 as of 2020-03-17). This will download an installer program. Launch it and follow the steps. You may also want to consider Anaconda. From a Mac OS terminal or the Windows Command Prompt or Windows PowerShell application enter the following command:
🌐
pythontutorials
pythontutorials.net › blog › install-python-with-cmd-or-powershell
How to Install Python Using Command Prompt or PowerShell on Windows (Without Admin Rights, Built-in Tools) — pythontutorials.net
This script sets the PATH and opens a new Command Prompt window. Create a shortcut to setup_python.bat on your desktop. Double-click it to launch a Command Prompt with Python in PATH.
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 1195583 › installing-python-with-powershell-and-system-accou
Installing Python with Powershell and "System" Account - Microsoft Q&A
April 2, 2023 - Hello there, This might be due to account privileges to your account instead of system account. You can also try package installers like a Chocolatey and see if that helps. You can not install it without administrator privileges. It would be lack of security. What you can use in pipelines for instance is: $url = "https://www.python.org/ftp/python/3.7.6/python-3.7.6-amd64.exe" $output = "C:/tmp/python-3.7.6-amd64.exe" if (Test-Path $output) { Write-Host "Script exists - skipping installation" return; } New-Item -ItemType Directory -Force -Path C:/tmp [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest -Uri $url -OutFile $output & $output /passive InstallAllUsers=1 PrependPath=1 Include_test=0 But still, Admin rights are required Hope this resolves your Query !!
🌐
Oxylabs
oxylabs.io › blog › how-to-run-python-script-in-powershell
How to Run Python Script in PowerShell
March 20, 2025 - This guide explains how to run Python scripts using the PowerShell command-line interface. It details the process of installing Python, creating a simple script, and executing it from PowerShell, enabling Python's capabilities within the Windows environment for scripting and automation.
🌐
Powershell Commands
powershellcommands.com › install-python3-on-windows-powershell
Install Python3 on Windows PowerShell: A Quick Guide
February 1, 2024 - Before you install Python3 on Windows PowerShell, ensure that your system meets the necessary hardware and software requirements. Python generally supports modern versions of Windows, but it is advisable to use at least Windows 10 or later.
🌐
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.