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
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.
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
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
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 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
🌐
Python
docs.python.org › 3 › using › windows.html
4. Using Python on Windows — Python 3.14.3 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.
🌐
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.

🌐
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....
🌐
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 - Variable Name: Python Variable Value: C:UsersAdministratorAppDataLocalProgramsPythonPython313 · Locate the Path entry in the System Variable section, highlight it, and then click the Edit button.
Find elsewhere
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › add package, directory to pythonpath in windows?
Add Package, Directory to PYTHONPATH in Windows? - Spark By {Examples}
May 31, 2024 - Adding Python to the PATH is a way to tell the operating system where to find the Python interpreter executable file. This allows you to run Python commands from anywhere on your system. On the other hand, We use the PYTHONPATH variable to find modules and packages that are not part of the standard library. PYTHONPATH tells Python where to look for these modules and packages. To add a Directory, file, or Python Package to PYTHONPATH in Windows...
🌐
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".
🌐
Great Learning
mygreatlearning.com › blog › it/software development › how to add python to path?
How To Add Python To Path?
November 15, 2024 - Open a new terminal or command prompt window and type 'Python--version'. The installed version number will be displayed if Python is successfully added to the path. After completing these steps, Python will be added to the system path, allowing ...
🌐
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
🌐
Geek University
geek-university.com › home › python › add python to the windows path
Add Python to the Windows Path - Geek University
June 25, 2022 - In our example, we have added the following value: ;C:\Python34 · Close all windows. Now you can run python.exe without specifying the full path to the file:
🌐
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:
🌐
Python
docs.python.org › 3 › library › sys_path_init.html
The initialization of the sys.path module search path — Python 3.14.3 documentation
The first entry in the module search path is the directory that contains the input script, if there is one. Otherwise, the first entry is the current directory, which is the case when executing the interactive shell, a -c command, or -m module. The PYTHONPATH environment variable is often used to add directories to the search path.
🌐
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
🌐
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. 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.
🌐
W3docs
w3docs.com › python
How to add to the PYTHONPATH in Windows, so it finds my modules/packages?
This will print a list of all the directories that Python is currently searching for modules and packages, if your directory is in that list, then you've set the PYTHONPATH correctly. It is worth mentioning that some version of python (namely Python 2) and some versions of windows, the PYTHONPATH variable will not be automatically read by the interpreter. in that case, you need to set it in the script before importing your modules. import sys sys.path.append("C:\path\to\your\module")
🌐
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.