How to Add Python to the Path Variable on Windows 10

Python Path Variable Windows 10
Run Python scripts in command prompt without typing the whole path.
Ash Ash (298)
Total time: 2 minutes 

If you want to run Python scripts on the command prompt, you’ll need to type the full Python installation path every time. To avoid this, you can add the Python installation directly to your Windows PATH variable.

The PATH variable is an environment variable that specifies a list of directories where executables can be found. If your executable—in this case, Python—can be found in one of the directories listed in your PATH environment variable, then you can call it directly without having to reference the full path.

Here's everything you'll need to complete this guide:

Windows 10 PC×1
Edit path variable Windows 10

Open the Start Menu, and type "Environment". Select the option labeled Edit the system environment variables. A window will open, select Environment Variables in the bottom right. The top portion of the window has a list of variables for the user currently logged in. Select the variable titled Path and then Edit…. Click New to add the Python installation path.

Now when you want to run a Python script in command prompt, you can just type Python instead of the full path.