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

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
Python - add PYTHONPATH during command line module run - Stack Overflow
I want to run: python somescript.py somecommand But, when I run this I need PYTHONPATH to include a certain directory. I can't just add it to my environment variables because the directory I want ... More on stackoverflow.com
🌐 stackoverflow.com
what does it mean to " Add python<version> to PATH " ?
The PATH environment variable holds a list of folders to search through when you attempt to run a program from the terminal. You want to tick that box during installation More on reddit.com
🌐 r/CodingHelp
3
3
December 29, 2021
What if you forget to add Python to PATH?
Try typing "py" which is the python launcher. It lives in C:\windows\ so is on the path. It allows you to choose which version of Python to launch if you have more than one. Use "py -h" to see the options. More on reddit.com
🌐 r/pythontips
3
31
August 20, 2021
🌐
Real Python
realpython.com › add-python-to-path
How to Add Python to PATH – Real Python
January 30, 2023 - In the section entitled User Variables, double-click on the entry that says Path. Another window will pop up showing a list of paths. Click the New button and paste the path to your Python executable there.
🌐
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 - Note: If you use Command Prompt, view PATH with the echo %PATH% command. Because the two systems share fundamental design similarities, the procedure for adding the Python directory to PATH on Linux and macOS is the same.
🌐
Great Learning
mygreatlearning.com › blog › it/software development › how to add python to path?
How To Add Python To Path?
November 15, 2024 - You can avoid this error by providing the full directory path to the Python executable each time you want to use it. For example: ... But that's cumbersome and prone to mistakes. A more convenient solution is to add the directory containing the Python executable to the Path variable.
Find elsewhere
🌐
Python
docs.python.org › 3 › using › windows.html
4. Using Python on Windows — Python 3.14.3 documentation
If you have existing installations of Python, or you have modified your PATH variable, you may need to remove them or undo the modifications. See Troubleshooting for more help with fixing non-working commands. When you first install a runtime, you will likely be prompted to add a directory to your PATH.
🌐
Educative
educative.io › answers › how-to-add-python-to-path-variable-in-windows
How to add Python to PATH variable in Windows
Another window opens up where we can see all the paths for the currently configured system variables. To add a new path for our Python program, we will click on the "New" button on the right side and paste the path in Step 1
🌐
Data to Fish
datatofish.com › add-python-to-windows-path
How to Add Python to Windows PATH
... Click on New... if no Path variable is present, Otherwise select the Path variable and then click on Edit… 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 ...
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-add-python-to-windows-path
How to add Python to Windows PATH? - GeeksforGeeks
July 12, 2025 - That's it, DONE! Now, after adding the Python to the Environment variable, let's check if the Python is running anywhere in the windows or not. To do this open CMD and type Python.
🌐
Geek University
geek-university.com › home › python › add python to the windows path
Add Python to the Windows Path - Geek University
June 25, 2022 - Go to the Advanced tab and click ... 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 (;)....
🌐
Cloudinary
cloudinary.com › home › how to add python to path – and why it matters
How to Add Python to PATH – and Why It Matters
August 1, 2025 - Click New and paste each path. Apply and restart terminal. Open a new command prompt and type python --version. If everything worked, you’ll see the installed Python version. ... On most Unix-based systems, Python is already installed, but it may be under python3. To check, try the terminal command which python3. To make python run Python 3, add an alias in your shell config:
🌐
Reddit
reddit.com › r/pythontips › what if you forget to add python to path?
r/pythontips on Reddit: What if you forget to add Python to PATH?
August 20, 2021 -

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

You will get a message saying,

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

This is because Windows is trying to search for Python in its PATH variable and is unable to find it.

Here is a step-by-step instruction 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. Pay Attention! 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".

Now you can open up your command line and run python. The Python interactive shell will open up.

*Here is a little extra tip! *

Add the Scripts folder to the PATH variable too. This is the folder where all your libraries will be installed.

If the instructions are not clear enough for you, you can also check out the visual guide containing images of every step, on my blog for achieving the above objective.

Good luck and let me know!

🌐
Machine Learning Plus
machinelearningplus.com › python › 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.
🌐
GitHub
bic-berkeley.github.io › psych-214-fall-2016 › using_pythonpath.html
Using PYTHONPATH — Functional MRI methods
$ # Set PYTHONPATH to path to the working directory + /code $ # This is for the "bash" shell on Unix / git bash on Windows $ export PYTHONPATH="$PWD/code" $ # Now the script can find "a_module" $ python3 scripts/a_script.py Running useful function
🌐
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
🌐
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.