You know what has worked for me really well on windows.

My Computer > Properties > Advanced System Settings > Environment Variables >

Just add the path as C:\Python27 (or wherever you installed python)

OR

Then under system variables I create a new Variable called PythonPath. In this variable I have C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk;C:\other-folders-on-the-path

This is the best way that has worked for me which I hadn't found in any of the docs offered.

EDIT: For those who are not able to get it, Please add

C:\Python27;

along with it. Else it will never work.

Answer from darren on Stack Overflow
🌐
Python
docs.python.org › 3 › using › windows.html
4. Using Python on Windows — Python 3.15.2 documentation
The directory will be %LocalAppData%\Python\bin by default, but may be customized by an administrator. Click Start and search for “Edit environment variables for your account” for the system settings page to add the path.
Discussions

Python and the PATH variable in Windows 10
If you type python and the store opens, Turn off the python alias in the Alias List in settings ( https://www.tenforums.com/tutorials/102096-manage-app-execution-aliases-windows-10-a.html ) More on reddit.com
🌐 r/Python
16
33
August 20, 2021
The absolute maze that is installing python and path variables
The official python (python.org) on Windows? The modern standard install on Windows does not use PATH at all anymore. Anyone telling you to use that is trying to make the modern install backwards compatible with the old-school way of doing things. Instead, python comes with the " python launcher ", which is the command "py". To run a file: py myfile.py To install a module: py -m pip install Etc. py is automatically associated with .py and .pyw files, so you can just doubleclick them to run as well. BUT WAIT, THERE'S A CATCH! The normal, proper way to develop python code is to make an isolated virtual environment for each project. If you do this it will activeate the old-school python and pip commands. So if you are working in a virtual environment To run a file: python myfile.py To install a module: pip install Note most good IDEs have the virtual environment management built in and often enabled by default. More on reddit.com
🌐 r/learnpython
99
209
January 28, 2022
Setting up Windows 10 path variables for Python 3
Al is wrong about the shebangs that he lists; all three operating systems should use #!/usr/bin/env python3. The path is completely ignored on Windows and it will only look at the python3 bit. Your two example shebangs are functionally identical. Since it doesn't matter what the path is on Windows, you might as well use the unix path, which I've given above. That way your scripts will be slightly more portable. The whole process of making a batch file is kind of unnecessary. You should be able to just execute your python script directly. PATH is the list of directories where windows will look when you type a command into cmd.exe or the Run dialog (or similar). If you want to be able to execute your scripts then add the directory they're stored in to the path. You should use your own directory for your own scripts; don't add anything to python's own folders. More on reddit.com
🌐 r/learnpython
9
11
January 19, 2018
Does winget Python 3 on Windows 11 add the Python path variable automatically?

I've never even heard of winget before, so I can't tell you if it does. I'd assume not by default.

But it may not really matter. You can access everything via the py-launcher, and you can always manually add it to PATH if you feel like it.

More on reddit.com
🌐 r/learnpython
8
2
January 22, 2022
🌐
Data to Fish
datatofish.com › add-python-to-windows-path
How to Add Python to Windows PATH
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:
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-add-python-to-windows-path
How to add Python to Windows PATH? - GeeksforGeeks
July 12, 2025 - Press the WINDOWS key and search for "Python", you will get something like this. If no results appear then Python is not installed on your machine, download it before proceeding further.
🌐
Real Python
realpython.com › add-python-to-path
How to Add Python to PATH – Real Python
July 23, 2026 - Another window will pop up showing a list of paths. Click the New button and paste the path to your Python executable there. Once that’s inserted, select your newly added path and click the Move Up button until it’s at the top. That’s it! You may need to reboot your computer for the changes to take effect, but you should now be able to call python from the command line. For setting the PATH environment variable from the command line, check out the section on Configuring Environment Variables in the Windows Python coding setup guide.
🌐
Liquid Web
liquidweb.com › home › help docs › server administration › windows server administration › adding python path to windows 10 or 11 path environment variable
Adding Python Path to Windows 10 or 11 PATH Environment Variable | Liquid Web
December 15, 2025 - On the initial setup screen, check the box at the bottom labeled “Add Python [version] to PATH”. The following steps allow you to confirm whether Python is already in your Windows PATH variable.
Find elsewhere
🌐
Geek University
geek-university.com › home › topic index › add python to the windows path
Add Python to the Windows PATH · Geek University
Avoid adding the same directory repeatedly, and remove obsolete entries when you are certain they are no longer needed. Press Windows + R to open the Run dialog. Enter sysdm.cpl and press Enter. This opens System Properties. Open the Advanced tab and select Environment Variables.
🌐
Geek University
geek-university.com › home › python online course › add python to path on windows
Add Python to PATH on Windows · Geek University
If Python is installed on Windows but the python command does not work in Command Prompt, the interpreter directory may not be in the Windows PATH. This guide shows how to find python.exe, add its folder safely, and test the result. PATH is an environment variable: a named operating-system setting ...
🌐
Reddit
reddit.com › r/python › python and the path variable in windows 10
r/Python on Reddit: Python and the PATH variable in Windows 10
August 20, 2021 -

Do you remember checking the box in the image shown below to add your Python installation to PATH in Windows 10?

Adding Python to PATH

Well, I was curious! What if someone accidentally forgot to check that little radio button? What would be the possible recovery steps?

So I spent my evening yesterday uninstalling Python and re-installing to figure out a way to add Python to the PATH post-installation.

If you forget to add Python to the PATH variable, you won't be able to run Python in your command line.

You will get a message saying,

‘python' is not recognized as an internal or external command.

Here are the steps I used to add Python to the PATH variable in Windows 10.

  1. Copy the directory to which Python is being installed.

  2. Search for System Properties in the Search Bar.

  3. Click on the "Environment Variables" button in System Properties.

  4. Click on the "Path" variable and then click on "Edit".

  5. Now here's the deal. Paste the directory path from Step 1 at the top of the list. You can use the "Move up" button to get it to the top. Now click on "Ok".

I found out that if you paste the path at the end, it still doesn't work. Can someone tell me why?

Anyways, if the steps are not clear to anyone, here is a visual guide containing images of every step, on my blog for achieving the above objective. If you are interested, do take a look.

🌐
Net Informations
net-informations.com › python › intro › path.htm
How to set python path
For enhanced Python accessibility via a command prompt, it's advisable to modify certain default environment variables within Windows. To temporarily set environment variables , open Command Prompt and use the set command: C:\>set PATH=C:\Program Files\Python 3.6;%PATH%
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › how to add python to path on windows, linux, and mac
How to Add Python to PATH on Windows, Linux, and Mac
December 12, 2025 - When a user types a terminal command ... any of the directories, the system executes it. Use Windows System Properties to add Python's installation directory to the PATH variable....
🌐
Microsoft Learn
learn.microsoft.com › en-us › windows › dev-environment › python
Python on Windows for beginners | Microsoft Learn
September 14, 2026 - To set this variable from PowerShell, use: $env:PYTHONPATH='list;of;paths' just before you launch Python.
🌐
Educative
educative.io › answers › how-to-add-python-to-path-variable-in-windows
How to add Python to PATH variable in Windows
A typical installation would have the following path, C:\Users\MyUserName\AppData\Local\Programs\Python\Python310 · Now, we will need to add this to the PATH variable, we right click on "This PC" and go to "Properties".
🌐
AccuWeb Hosting
manage.accuwebhosting.com › portal home › knowledgebase › windows vps hosting › how to add python path to windows environment variables?
How to Add Python Path to Windows Environment Variables? - AccuWebHosting
March 28, 2025 - Achieving this requires adding the Windows 10 or 11 PATH environment variable, allowing your system to recognize and execute Python commands without caring for the current directory. The PATH environment variable is a system setting that informs Windows where to search for executable programs when you execute a command at the command prompt or PowerShell.
🌐
YouTube
youtube.com › the code city
Add Python to Path Environment Variable - Windows 10 - YouTube
In this tutorial, we will show you the process of adding Python to the Path variable in Windows 11 or Windows 10. By adding Python to the Path variable, you ...
Published: May 24, 2023
Views: 30K
🌐
YouTube
youtube.com › artur spirin
How to add Python Path to Environment Variables in Windows 10 - YouTube
This video will show you how to set Windows 10 environment variables for Python. You can use this method to set Environment variables not just for Python but...
Published: January 14, 2016
Views: 397K
🌐
MakeUseOf
makeuseof.com › home › programming › how to add python to the windows path variable
How to Add Python to the Windows PATH variable
October 13, 2020 - Highlight and copy the entire path text to your clipboard with Ctrl + c. Then continue with the next steps below. To add Python to the PATH in User variables, right-click on This PC, and select Properties. Once in the properties menu, click ...
🌐
Machine Learning Plus
machinelearningplus.com › blog › add python to path – how to add python to the path environment variable in windows?
add Python to PATH - How to add Python to the PATH environment variable in Windows? | MLPlus
March 23, 2023 - For example, if Python is installed ... of Windows) and select “Properties”. Step 4. In the System Properties window, click on “Advanced system settings” on the left side....
🌐
TutorialsPoint
tutorialspoint.com › article › how-to-set-your-python-path-on-windows
How to set your python path on Windows?
March 24, 2026 - In the Environment Variables dialog, look for PYTHONPATH under System Variables. If it doesn't exist, click "New" to create it. If it exists, select it and click "Edit". Add your directory path to the end of the current value, separating multiple ...