How to add Python to PATH in Windows 10

Python Path is the folder in your Windows 10 computer where you will find python.exe executable. This location must be in the Windows PATH environment variable or you will get an error, such as python is not recognized as an internal or external command, when you try to run the python command.

If you used the chocolatey package manager to install python, then the path should be something like C:\Python38.

The chocolatey package manager automatically adds Python to the PATH environment variable.

The chocolatey package manager automatically adds Python to the PATH environment variable. If you are not sure, open a command prompt and type python -V. You should get the python version.

If you install python through the executable downloaded from the python website, then the path should be in your Windows 10 user directory under the AppData folder which is a hidden folder (C:\Users\username\AppData\Local\Programs\Python38).

How to add Python to PATH in Windows 10

We can add Python to Path manually in Windows 10 by opening the Control Panel and selecting System and Security. Then choose System.

We can add Python to Path manually in Windows 10

Click Advanced System Settings and then click Environment Variables under the Advanced tab.

Windows 10 Environment Variables

Under the System variables, select the Path variable and click Edit.

add python to environment variables

Click the New button, and paste the full path to your python folder in the text box that appears.

add python to path windows 10

Close the command prompt and open a new one before entering the python command.