How to Add Python to Windows PATH
There are two ways to add Python to Windows PATH:
- Via the installation of a recent Python version
- Manually adding an Windows environment variable
Method 1: Install a Recent Python Version
You can easily add Python to Windows PATH by downloading a recent version of Python and then checking the Add python.exe to PATH box at the bottom of the setup screen:

Finish the installation, and you are good to go! You can verify that you correctly added Python to PATH by typing the following command in your Command Prompt and hitting return:
python -V
The returned output should be a version number, e.g., "Python 3.11.1".
Method 2: Manually add Python to Windows PATH
If you have Python already installed and it's not added to PATH yet, you may apply the steps below to manually add Python to Windows PATH.
Step 1: Navigate to the Windows Environment Variables Screen
Press the Windows Key + R on your keyboard to open the Run dialog box
and type sysdm.cpl to open the System Properties:

Go to the Advanced tab and then click on Environment Variablesā¦:

That should open the Environment Variables window, where you can add/edit your paths.

Step 2: Add a Path variable
Under the User variables box:
- Click on
New...if noPathvariable is present, - Otherwise select the
Pathvariable and then click onEditā¦instead.
You should then see the New User Variable box.

Type Path in the Variable name field.
For the Variable value you will need to know the path to the Python that is installed on your computer.
To find the path, search python, right click on the relevant search result and click Open file location:

In the Windows Explorer right click on the Python icon and click on Properties:

Copy the target path without the python.exe part:

Here is an example of a Python application path:
C:\Users\...\Programs\Python\Python311
You also need the Python Scripts path. The Scripts folder is located within the Python application path:
C:\Users\...\Python\Python311\Scripts
Both paths go into the Variable value field concatenated by a semicolon:
...\Python\Python311;...\Python311\Scripts

Finally, hit OK and you will see your Path variable in the User variables section.
Donāt forget to hit OK in the Environment Variable window to confirm your changes.
That's it, you just manually added Python to the Windows Path!
You can verify that you correctly added Python to PATH by executing the following command in your shell:
python -V
The output should be a version number.