The PATH is the system variable that your operating system uses to locate needed executables from the command line or Terminal window.
Click Start and type “Environment”. Browse to Edit the system environment variables.
- Click New
- Enter Variable = “PATH“
- Paste PATH to Python installer
To find the Python executable, you’ll need to look for a file calledpython.exe
. The Python executable could be in a directory inC:\Python\
or in yourAppData\
folder, for instance. If the executable were inAppData\
, then the path would typically look something like this:
C:\Users\<USER>\AppData\Local\Programs\Python
In this example I set the PATH to Python.
python --version
Understanding What PATH
Is
PATH
is an environment variable that contains a list of paths to folders. Each path in PATH
is separated by a colon or a semicolon—a colon for UNIX-based systems and a semicolon for Windows. It’s like a Python variable with a long string as its value. The difference is that PATH
is a variable accessible by almost all programs.