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
🌐
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
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

Discussions

Installing Python with Powershell and "System" Account
If i run the same installer script ... then python fully installs. I don't know why Windows seems to not want to cooperate with the installing when it should actually work. Is anybody able to guide me on an install method I can employ to get around this as the process needs to use task Scheduler this way. ... Upon more investigation, it seems that registry is not populating HKEY_USERS(USER SID)\SOFWARE\Classes\Installer\Dependencies\CPython-3.10 It creates ... More on learn.microsoft.com
🌐 learn.microsoft.com
2
0
April 2, 2023
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
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
Starting Python on windows 10 in PowerShell ISE?
Windows Terminal is the best shell wrapper for Windows 10 or Windows 11. You need to be at a somewhat newer version of Windows 10 in order to install Windows Terminal. From Windows Terminal, you can launch regular CMD or Powershell, both of which can be configured with colors and fonts via the Windows Terminal settings. You can choose a font that supports the Unicode symbols you want to display. Windows Terminal can be installed from the Windows Store or downloaded and installed from the official github. More on reddit.com
🌐 r/learnpython
4
1
February 3, 2022
🌐
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.
🌐
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.
🌐
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
🌐
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 - 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…
Find elsewhere
🌐
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!

🌐
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/).
🌐
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?
🌐
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 3 programming environment.
🌐
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 ...
🌐
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.
🌐
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:
🌐
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.
🌐
Reddit
reddit.com › r/learnpython › starting python on windows 10 in powershell ise?
r/learnpython on Reddit: Starting Python on windows 10 in PowerShell ISE?
February 3, 2022 -

I am slowly getting a new laptop loaded with the software I need, and I have installed a base Python and a few packages using Miniconda. For console use I have the options of a command prompt, or a power shell prompt. But neither have fonts which provide enough Unicode symbols to, for example, display mathematical expressions in SymPy. I understand that the fonts available in PowerShell ISE have a greater variety of glyphs for display.

But I can't run python in PowerShell ISE as clearly I need to set up various environment variables first.

Where can I find a batch file that will set the appropriate environment variables (path etc) for me to run Python from a different Windows shell? Or failing that, how can I find out what environment variables to set, and how?

(Note: I'm needing to use Windows for work; my base OS is Linux. I'm unclear on the best way to set environment variables in Windows.)

🌐
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.
🌐
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. To ensure a silent installation without any user interface or interaction, the script employs the Start-Process cmdlet with the /quiet argument.
🌐
Powershell Commands
powershellcommands.com › install-python3-on-windows-powershell
Install Python3 on Windows PowerShell: A Quick Guide
February 1, 2024 - Python generally supports modern ... at least Windows 10 or later. Additionally, while Python runs well on conventional hardware, having a system with a decent amount of RAM and a modern processor will enhance performance. It's important to first check if Python is already installed on your system. To do this, open PowerShell and execute: ... If Python is installed, you will see the version number. If it is not installed, you will receive a message indicating that the 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.