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 - The quick fix for this is just adding your new Python directory before the old Python directory, though you’d probably want to clean your system of the bad Python installation too. Toggle between prepending and appending your Python directory below, and watch the shell stop at the very first match: Interactive diagram — enable JavaScript to view. Reordering PATH on Windows is relatively straightforward.
Discussions

python - Permanently add a directory to PYTHONPATH? - Stack Overflow
This works just perfectly, I was ... the directory if it doesn't exist) parts were what I was missing to get it working. 2013-03-09T21:33:14.593Z+00:00 ... Do I need to take an additional step so python would recognize the added path to somelib.pth? If not, any guesses why this might not be working? 2018-04-04T07:13:15.967Z+00:00 ... On Windows, with Python ... 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
How to add my project folder to the PYTHONPATH?
Search environment variable in the windows search bar New dialogue box appears Then click on environment variable Then u can find in users tab PATH Double click amd open it Then add the path of u r file Then save and then apply That's it ☺️ More on reddit.com
🌐 r/learnpython
17
1
August 17, 2021
How to add directories to the PATH ?
This has nothing to do with python, but here you go. On Windows 10: Click start, search for "environment variables". Click "edit environment variables". If the top box (user variables) has one named "Path", click on it, click "Edit". A new window pops up. Click "New" and paste in "C:\Program Files (x86)\Python\Scripts". If the top box does not have a variable named "path" click New to create one, set the name to "Path", and the value to "C:\Program Files (x86)\Python\Scripts". More on reddit.com
🌐 r/learnpython
4
3
May 30, 2019
🌐
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....
🌐
Net Informations
net-informations.com › python › intro › path.htm
How to set python path
For instance, if you enter "Python" ... Python to the PATH environment variable, follow these steps: Open the command prompt (Windows), or terminal (macOS, Linux) and navigate to the Python installation directory....
🌐
Python
docs.python.org › 3 › using › windows.html
4. Using Python on Windows — Python 3.15.2 documentation
To install the file downloaded from python.org, either double-click and select “Install”, or run Add-AppxPackage <path to MSIX> in Windows PowerShell. After installation, the python, py, and pymanager commands should be available.
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
Enter the directory containing python.exe, for example C:\Python34. Confirm with OK in each open dialog so the change is saved. Current Windows editors display PATH entries as separate rows. Older interfaces may show one long value; in that case, separate directory entries with a semicolon (;). Do not delete or replace the existing PATH value. Add Python as another entry.
🌐
GitHub
bic-berkeley.github.io › psych-214-fall-2016 › using_pythonpath.html
Using PYTHONPATH — Functional MRI methods
For example, let’s say I wanted add the directory /Users/my_user/code to the PYTHONPATH: ... Open the file ~/.bash_profile in your text editor – e.g. atom ~/.bash_profile; ... Save the file. ... It should show something like /Users/my_user/code. ... Open the file ~/.bashrc in your text editor – e.g. atom ~/.bashrc; ... Save the file. ... It should show something like /home/my_user/code. Got to the Windows menu, right-click on “Computer” and select “Properties”:
🌐
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.

🌐
Reddit
reddit.com › r/learnpython › how to add my project folder to the pythonpath?
r/learnpython on Reddit: How to add my project folder to the PYTHONPATH?
August 17, 2021 -

I am using a scheduler app that requires the full path of my project.pythonfile.method to run the method that needs to be scheduled.

But it is not working.

I noticed even from project.pythonfile import method is not found. I never needed that as I am using relative paths until now (from .pythonfile import method). But as my scheduler is a third party app, I don't think it will work.

I did some research and I think I need to append my project folder to the PYTHON PATH variable. Does anyone know how to do that? is there a GUI in the Windows interface? or is it all command based?

I assume it is different from the OS Environment PATH variable? or no?

I am using Windows btw.

🌐
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 ...
🌐
YouTube
youtube.com › rajarshi chattopadhyay
How to ADD FOLDERS to PYTHON PATH - Calling modules from anywhere in your PC - IMPORT ERROR - SOLVED - YouTube
This video demonstrates how to add any folder o your Windows 10 PC to the Python path. This makes calling your custom made modules easier and from anywhere i...
Published: July 2, 2019
Views: 2K
🌐
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:
🌐
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.
🌐
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".
🌐
Mimo
mimo.org › tutorials › python › how-to-add-python-to-path
How to Add Python to PATH
What you might do: add the python.exe file path instead of the folder, or add a different Python folder than the one you want. Why it breaks: PATH must contain directories, and Windows runs the first matching python.exe it finds.
🌐
Geek University
geek-university.com › home › topic index › add python to the windows path
Add Python to the Windows PATH · Geek University
Enter sysdm.cpl and press Enter. This opens System Properties. Open the Advanced tab and select Environment Variables. 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.