How to Install Python on Windows

Python is one of the most popular and widely used programming languages. Learn three different ways to install it on Windows 10. 

Written by Jim Clyde Monge
person downloading a file on a windows laptop
Image: Shutterstock / Built In
UPDATED BY
Matthew Urwin | Oct 10, 2024

Python has emerged as one of the most popular and widely used languages across the globe. Popular for its simplicity and readability, Python is used in areas ranging from desktop applications to web development to artificial intelligence.

4 Steps to Install Python on Windows 10

  1. Go to Python’s website and download the latest version of Python.
  2. Select “Windows installer” and click download.
  3. Follow the on-screen instructions.
  4. Verify the installation by opening a command prompt and typing: python -V.

If you want to start writing in Python, you’ll need to download it. In this article, I’ll show you how to install Python on your Windows PC.

 

How to Install Python on Windows With Python Installer

First, go to the Python website and click on the “Download Python” button. Select the latest version. As of this writing, that would be Python 3.13.0. 

Screenshot of Python's download website page.
Screenshot of Python’s website to download Python. | Screenshot: Python Software Foundation

Select the “Windows installer” option and click on the “Download” button. Once the download is complete, run the installer.

Screenshot of the Python installer window.
Screenshot of the Python installer. | Screenshot: BIGLOBE

During the process, it’s advisable to check the boxes “Use admin privileges when installing py.exe” and “Add python.exe to PATH” to save the trouble of manual adjustments in the environment variable later.

Then, follow the on-screen instructions to install Python. Once the installation is complete, you should see a success message like this:

Screenshot of successful Python installation.
Successful Python installation for Windows. | Screenshot: Amit Thinks

You can verify that Python has been installed by opening a command prompt and typing the following command: python -V.

Command prompt screen verifying that Python has been installed
Command prompt screen verifying that Python has been installed. | Image: Jim Clyde Monge

This will display the Python version currently installed.

The advantage of installing Python via an installer file is that it is easy to use but requires a few more clicks than installing Python via the command-line interface (CLI).

More on PythonPip Command Not Found on Windows: A Guide

 

How to Install Python on Windows Via CLI

Windows doesn’t have a built-in package manager like some other operating systems, but you can use a third-party package manager like Chocolatey.

First, go to the Chocolatey website and follow the installation instructions. You have to run the following command in an elevated PowerShell.

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Windows Powershell code to install Chocolatey
Windows Powershell code for the Chocolatey installation. | Image: Jim Clyde Monge

Open a command prompt as an administrator and run the following command to install Python:

choco install python

If the installation is successful, you should see the following message:

Successful Python installation code.
Message signifying that Python has been installed. | Image: Jim Clyde Monge

Once the installation is complete, you can check the Python version by running python --version in the command prompt.

Entering the command prompt python --version to verify Python installation.
Verification that Python has been installed correctly. | Image: Jim Clyde Monge

Installing via the CLI is a more direct and efficient way to install Python, and it allows you to install the latest version. However, it can be more difficult than using a Python installer, especially for beginners.

 

How to Install Python Using Windows Subsystem for Linux

This method allows you to run a Linux distribution alongside your existing Windows installation. You’ll need to first install Windows Subsystem for Linux.

To start installing Python, open an elevated PowerShell and run this command:

wsl — install
Code from running the command wsl - install in Powershell
Information that appears when you run the command wsl — install in Powershell. | Image: Jim Clyde Monge

Follow the on-screen instructions and restart your computer if prompted. Then, open WSL on the CLI again and install Python by running this command:

sudo apt install python3
Running the command sudo apt install python3 in Powershell
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. | Video: ProgrammingKnowledge2

More on PythonPython: How to List Files in Directory

 

How to Uninstall Python

Uninstalling is pretty simple; just open the “Programs and Features” window, right-click on the Python installed, and select “Uninstall.”

screenshot of how to uninstall Python
Uninstall Python on Windows. | Screenshot: Jim Clyde Monge

Alternatively, you can also uninstall Python from the CLI by running the following command:

choco uninstall python
running a code prompt to uninstall python
Running a code prompt to uninstall Python. | Image: Jim Clyde Monge

Regardless of the method you used to uninstall, you may want to check the following to ensure Python is completely removed:

Ensure any Python references are removed from the system PATH variable. This can be edited through “System Properties → Advanced → Environment Variables.”

You might also want to manually delete any leftover Python directories from your system, particularly in places like C:\Program Files\ or C:\Users\[YourUsername]\AppData\Local\.

At this point, you should have a Python 3 programming environment set up on your local Windows machine and can begin coding your projects.

Frequently Asked Questions

No, Python is not automatically included in Windows systems. Users need to manually install Python through the various methods available, like visiting the Python website.

After installing Python on Windows, users must enter the appropriate command prompts to start running Python programs.

Python in itself is not a security threat, but it can be vulnerable to injection attacks, cross-site scripting attacks and other types of cyber attacks. Take precautions by investing in security frameworks and following cybersecurity best practices. When issues do arise, be sure to report them through the appropriate channels.

Explore Job Matches.