Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Add Python to the PATH in Windows 10

Put Python in your PATH so you can run python and pip from any folder in Command Prompt.

Windows Hosting2 min read3 steps11 screenshots

Method 1: During the installation

The easiest way is to tick the box in the Python installer.

  1. Download the installer from python.org and run it.
  2. On the first screen, tick Add python.exe to PATH.
    The Add Python to PATH check box in the installer
  3. Click Install Now.

If you already installed Python without it, run the installer again, choose Modify, and tick Add Python to environment variables. Or use method 2.

Method 2: By hand

Step 1: Find the Python folder

Python is usually in a path like this (the version number can differ):

C:\Users\username\AppData\Local\Programs\Python\Python38

Also note the Scripts folder inside it:

C:\Users\username\AppData\Local\Programs\Python\Python38\Scripts
The Python installation folder

Step 2: Open the system properties

Press the Windows key, type environment variables and open Edit the system environment variables.

Searching for environment variables
System Properties

Step 3: Open the variables

Click Environment Variables...

The Environment Variables button

Step 4: Edit Path

Under User variables, select Path and click Edit.

Selecting the Path variable

Step 5: Add the folders

Click New and paste the Python folder. Click New again and paste the Scripts folder.

Adding a new entry
The Python and Scripts folders in Path

Step 6: Save

Click OK in all windows.

Confirming the Path change
Closing the windows

Step 7: Test it

Open a new Command Prompt (the old one does not see the change) and run:

python --version
Python version in Command Prompt

You can also test pip --version.

Note: If a Microsoft Store shortcut opens when you type python, turn it off in Settings, then Apps, then App execution aliases.

Quick recap

  • Tick Add python.exe to PATH in the installer.
  • Or add the Python and Scripts folders to Path by hand.
  • Open a new Command Prompt and run python --version.