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
🌐
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.
🌐
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.
🌐
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: Finish the installation, and you are good to go!
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-add-python-to-windows-path
How to add Python to Windows PATH? - GeeksforGeeks
July 12, 2025 - 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) Below are the ways by which we can add Python to the Windows path:
🌐
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. In User variables, ...
🌐
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%
🌐
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 › 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 ...
🌐
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. Setting this variable globally through the Environment Variables settings is not recommended, as it may be used by any version of Python ...
🌐
YouTube
youtube.com › watch
How To Add Python to PATH in Windows - YouTube
The tutorial explains how to add Python to the Windows PATH in two different ways, allowing users to run Python scripts and access Python packages directly f...
Published: September 28, 2024
🌐
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".
🌐
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 ...
🌐
YouTube
youtube.com › watch
How to Add Python to PATH on Windows (Step-by-Step Guide) - YouTube
Learn how to manually add Python to the PATH on Windows. This lets you run Python and pip from the command prompt. Step-by-step instructions show how to loca...
Published: March 18, 2026
🌐
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 ...
🌐
Python.org
discuss.python.org › python help
Python Installation - Python Help - Discussions on Python.org
December 7, 2023 - Hello, I recently got python downloaded in my system. able to open all terminals, Idle windows able to access Pycharm. but really not sure where is the exact location of Python installed when i try to check from Command prompt. I wanted to add Environmental Variables. Please help.
🌐
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
🌐
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 - Step 7. In the “Edit environment variable” dialog, click on the “New” button, and paste the Python installation directory path that you copied in step 2. Repeat this step to add the \Scripts subdirectory path as well. Step 8. Click “OK” to close the “Edit environment variable” dialog, “OK” again to close the “Environment Variables” dialog, and one last “OK” to close the “System Properties” dialog. Step 9. Restart any open command prompt windows, or open a new one.