How to add Python to Windows PATH?
Last Updated :
07 Dec, 2023
Python is a great language! However, it doesn’t come pre-installed with Windows. Hence we download it to interpret the Python code that we write. But wait, windows don’t know where you have installed the Python so when trying to any Python code, you will get an error. We will be using Windows 10 and python3 for this article. (Most of the part is the same for any other version of either Windows or Python)
Add Python to Windows Path
Below are the ways by which we can add Python to the Windows path:
Step 1: Locate Python Installation
First, we need to locate where the Python is being installed after downloading it. Press the WINDOWS key and search for "Python", you will get something like this.

Step 2: Verify Python Installation
If no results appear then Python is not installed on your machine, download it before proceeding further. Click on open file location and you will be in a location where Python is installed, Copy the location path from the top by clicking over it.

Step 3: Add Python to Path as an Environmental Variable
Now, we have to add the above-copied path as a variable so that windows can recognize. Search for "Environmental Variables", you will see something like this:

Click on that

Now click the "Environmental Variables" button

Step 4: Add Python Path to User Environmental Variables
There will be two categories namely "User" and "System", we have to add it in Users, click on New button in the User section. Now, add a Variable Name and Path which we copied previously and click OK. That's it, DONE!

Step 5: Check if the Environment variable is set or not
Now, after adding the Python to the Environment variable, let's check if the Python is running anywhere in the windows or not. To do this open CMD and type Python. If the environment variable is set then the Python command will run otherwise not.
Similar Reads
How to Install iPython on Windows? Ipython is a toolkit used for using Python interactively using a Python shell and also provides a Jupyter kernel to work with Python code in Jupyter notebooks. In this article, we will look into the process of installing ipython package on Windows. Pre-requisites: The only thing that you need for in
2 min read
How to update Python on Windows? In this article, we are going to see how to update Python in the Windows system. For the sake of example, we will be upgrading from Python 3.6.8 to Python 3.9.6. Here, we will see how to upgrade the Python version.Upgrading Python on WindowsTo check the current version of Python on your system, use
3 min read
How to install Python on Windows? Python is a high-level programming language that has become increasingly popular due to its simplicity, versatility, and extensive range of applications. The process of How to install Python in Windows, operating system is relatively easy and involves a few uncomplicated steps. This article aims to
5 min read
How to use CMD for Python in Windows 10 Want to run Python programs directly from the Command Prompt? This guide will walk you through how to run Python in CMD, configure the environment, and troubleshoot common issues. By mastering these steps, youâll streamline your development process and save time during testing.Steps to Use CMD for P
4 min read
How to setup Python, PyEnv & Poetry on Windows Setting up a robust Python development environment on Windows involves installing Python itself, managing multiple versions with PyEnv, and handling dependencies and project environments with Poetry. This guide will walk you through each step to get your system ready for efficient and organized Pyth
3 min read
How to Install Jmespath in Python in Windows? Jmespath is known as the JSON query language for Python. It is used to get the required data from the JSON document or dictionary easily. This library is available for Python as well as other programming languages so you can use it in many places according to the need. In this article, we will be lo
2 min read