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
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
How to add python to path and how to use it in commandline/powershell?
Reinstall Python from https://python.org . During the first step in setup, there'll be an option to add Python to PATH. Select it More on reddit.com
🌐 r/learnpython
13
1
October 25, 2025
How do I "set Python to PATH" without reinstalling Python?
So, my question is: Is there a way to set python to PATH without reinstalling it? If not, I'll just make sure my python scripts are saved somewhere safe and reinstall python. ... Sorry I took so long to reply. I'm using Windows 10. More on teamtreehouse.com
🌐 teamtreehouse.com
1
October 1, 2017
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
208
January 28, 2022
🌐
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…
🌐
Python
docs.python.org β€Ί 3 β€Ί using β€Ί windows.html
4. Using Python on Windows β€” Python 3.14.3 documentation
As specified in PEP 11, a Python ... 3.14 supports Windows 10 and newer. If you require Windows 7 support, please install Python 3.8. If you require Windows 8.1 support, please install Python 3.12. Windows historically has limited path lengths to 260 characters....
🌐
GeeksforGeeks
geeksforgeeks.org β€Ί python β€Ί how-to-add-python-to-windows-path
How to add Python to Windows PATH? - GeeksforGeeks
July 12, 2025 - 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. Now, we have to add the above-copied path as a variable so that windows can recognize.
🌐
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.

Find elsewhere
🌐
Real Python
realpython.com β€Ί add-python-to-path
How to Add Python to PATH – Real Python
January 30, 2023 - In this tutorial, you'll learn about how to add Python, or any other program, to your PATH environment variable. You'll be covering the procedure in Windows, macOS, and Linux and find out what PATH is and why it's important.
🌐
Microsoft Learn
learn.microsoft.com β€Ί en-us β€Ί windows β€Ί dev-environment β€Ί python
Python on Windows for beginners | Microsoft Learn
1 month ago - If you install Python using the installers from python.org and select the "add to PATH" option, the new python command will take priority over the shortcut.
🌐
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 - Properly configure Python on your Windows machine by adding the Python path to the Windows 10 / 11 PATH environment variable, allowing your system to recognize and execute Python commands regardless of the current directory.Windows Operating System environment variable specifies the location of Python libraries, allowing Python to be readily accessible from any location within your system.
🌐
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....
🌐
Visual Studio Code
code.visualstudio.com β€Ί docs β€Ί python β€Ί environments
Python environments in VS Code
November 3, 2021 - Workspace β”œβ”€β”€ Python Project: backend/ β”‚ └── Environment: .venv (Python 3.12) β”‚ └── Manager: venv β”‚ β”œβ”€β”€ Python Project: frontend-utils/ β”‚ └── Environment: .venv (Python 3.10) β”‚ └── Manager: venv β”‚ └── Python Project: ml-pipeline/ └── Environment: ml-env (Python 3.11) └── Manager: conda ... Test Explorer: each project gets its own test tree with its own interpreter (see Multi-Project Testing) ... Pylance and Jupyter currently use a single interpreter per workspace, not per-project environments. See Known Limitations. ... When you add a project, its folder is automatically added to the environment search path.
🌐
Geek University
geek-university.com β€Ί home β€Ί python β€Ί add python to the windows path
Add Python to the Windows Path | Python#
June 25, 2022 - In the System variable window, find the Path variable and click Edit: Position your cursor at the end of the Variable value line and add the path to the python.exe file, preceeded with the semicolon character (;).
🌐
Astral
docs.astral.sh β€Ί uv β€Ί guides β€Ί install-python
Installing and managing Python | uv
July 17, 2025 - Once Python is installed, it will be used by uv commands automatically. uv also adds the installed version to your PATH:
🌐
Great Learning
mygreatlearning.com β€Ί blog β€Ί it/software development β€Ί how to add python to path?
How To Add Python To Path?
November 15, 2024 - For Windows users, we explained how to check if Python is already installed, how to add Python to the PATH on Windows 10/8/7, and how to verify the PATH configuration. On macOS, we outlined the process of checking Python installation, adding Python to the PATH, and verifying the configuration.
🌐
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 - Learn how to access Python from anywhere on the command line by adding it to your Windows PATH variable.
🌐
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 β€Ί knowledgebase β€Ί 5229 β€Ί How-to-Add-Python-Path-to-Windows-Environment-Variables.html
How to Add Python Path to Windows Environment Variables? - AccuWebHosting
Specify the version: py -3.10 or py -3.9. Always use the official Python installer. Keep Python updated. Consider using virtual environments for project-specific dependencies. For advanced users: Use tools like pyenv-win for Python version management. Regularly check and update your PATH to prevent conflicts. Adding Python to the Windows PATH is a crucial step in setting up your Python development environment.