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 - Note: Pedantically speaking, rc files are generally for settings that affect the look and feel of your command-line prompt, not for configuring environment variables like PATH. But you can use rc files for your PATH configuration if you prefer. To add the Python path to the beginning of your PATH environment variable, you’re going to be executing a single command on the command line.
Discussions

PYTHON How to SET pythonpath in window 10 - Stack Overflow
I'm trying to set pythonpath but when I follow in some example in other stackoverflow, I just get a red message or nothing happened. In my picture, u can see, no my folder D:\DemoPython Does anyon... More on stackoverflow.com
🌐 stackoverflow.com
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
Python was not found but can be installed from the Microsoft Store

Check your paths in the environment variable settings. Had the same issue. The order of your path entries is hierarchical. So if the winapps directory is listed first, it will send you to the app store. Move your python install directory, bin, and lib-scripts to the top

More on reddit.com
🌐 r/vscode
16
5
November 11, 2019
Changing default python version in Windows
Why bother when the Python Launcher For Windows is designed so that you can pick which version you want? More on reddit.com
🌐 r/Python
4
0
February 1, 2018
🌐
Python
docs.python.org › 3 › using › windows.html
4. Using Python on Windows — Python 3.15.2 documentation
If you have any Python 3.7+ ... to set the environment variable temporarily or use the -X utf8 command line option. ... Console I/O including standard I/O (see PEP 528 for details). The filesystem encoding (see PEP 529 for details). These notes supplement the description at The initialization of the sys.path module search path with detailed Windows ...
🌐
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 - Type in the full installation path to your Python installation with Scripts added to the end of it. In our example, we are using: C:UsersAdministratorAppDataLocalProgramsPythonPython313Scripts · Check the path again using the method listed above to verify the installation. PATH order determines which executable file you access first after entering a command. How it works: When you run a command in Command Prompt/ PowerShell, Windows scans through the directories listed in PATH – from top to bottom attempting to find a matching executable, running the first one that matters.
🌐
Opt Node
optnode.com › home › guides › how to set python path in windows 10: a step-by-step guide
How to Set Python Path in Windows 10: A Step-by-Step Guide - Opt Node
March 5, 2026 - Modify the Path variable to include the Python directory. Under System Variables, find the "Path" variable and click "Edit." Add the Python directory path you found earlier and click "OK" to save. Check if your changes were successful. Open Command Prompt and type python --version.
Find elsewhere
🌐
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%
🌐
Data to Fish
datatofish.com › add-python-to-windows-path
How to 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. 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.
🌐
NBShare
nbshare.io › notebook › 462254290 › How-To-Add-Python-To-Windows-10-PATH
How To Add Python To Windows 10 PATH - Nbshare Notebooks
February 21, 2021 - You should see in the same directory ... add your "Scripts" folder path to the System environment Variables. 3. Open new "cmd" prompt window and type "pip --version"....
🌐
Geek University
geek-university.com › home › topic index › add python to the windows path
Add Python to the Windows PATH · Geek University
In User variables, select Path for a per-user setup. Select the Path entry under System variables only when a machine-wide change is required. Select Edit. In the modern list-based editor, choose New for each directory. Add the directory containing python.exe as one separate entry. If you want direct access to pip-installed command-line tools, add the corresponding Scripts directory as another separate entry.
🌐
UltaHost
ultahost.com › home › docs › other › general guides
How to add Python Path to Windows 10 PATH | Ultahost Knowledge Base
May 16, 2024 - This method involves modifying the path of an existing Python installation. To verify if the path setting is correct or current, follow these steps. ... Start > Windows System > Command Prompt.
🌐
Educative
educative.io › answers › how-to-add-python-to-path-variable-in-windows
How to add Python to PATH variable in Windows
We have successfully added the path for our Python program to our system's environment variables. The best practice is to restart the system afterward for the change to occur. Now, we can verify if the PATH variable was configured correctly by opening up the terminal and entering the command python --version.
🌐
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....
🌐
Geek University
geek-university.com › home › python online course › add python to path on windows
Add Python to PATH on Windows · Geek University
Do not replace existing PATH entries. Optionally add the related Scripts directory for pip-installed commands. Open a new Command Prompt. Run python --version and where python. For related command-line basics, see Python command line, installing Python on Windows, and running Python code.
🌐
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 - Checking that box adds Python to your Windows PATH automatically. That means you can start running Python commands via the command line immediately after installation.
🌐
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.

🌐
Linux Hint
linuxhint.com › add-python-windows-path
How to Add Python to Windows Path? – Linux Hint
The following steps will add python ... “Command Prompt” from the “Startup” menu: Step 2: Add Python to Windows Path Set Python Path environment variable using provided command....
🌐
Microsoft Learn
learn.microsoft.com › en-us › windows › dev-environment › python
Python on Windows for beginners | Microsoft Learn
September 14, 2026 - When running, you can inspect the sys.path variable to see which directories will be searched when you import something. To set this variable from the Command Prompt, use: set PYTHONPATH=list;of;paths.
🌐
GitHub
gist.github.com › queenvictoria › c04d5e4370308b6e482d93809c0f36d4
Put Anaconda python path on Windows 10 command line · GitHub
Put Anaconda python path on Windows 10 command line · Raw · README.md · Open Anaconda prompt from the start menu. Type where python and note the path (you can't copy it). Open sysdm.cpl from the start menu.