4. Adding Python Paths to Environment Variables
After opening the Environment Variables window, the next step is to add a Python Path to the variable. Here are the steps to follow:
Find and Select Variabel Path
- In the System Variables section, look for a variable named Path.
- Select the variable and click the Edit…. button.
Add Python Installation Folder Location
- In the Edit Environment Variables window, you’ll see a list of existing paths.
- Click the New button to add a new path.
- Enter the location of the Python installation folder. These locations are usually the following:
C:\Users\<Username>\AppData\Local\Programs\Python\Python313
Replace <Username> with your appropriate username.
Add Scripts Directory
After adding the main installation path, you will also need to add the Scripts directory that is inside the Python installation folder. These paths are usually the following:
C:\Users\<Username>\AppData\Local\Programs\Python\Python313\Scripts
Click the New button again and enter this path.
Save Changes
- Once all paths have been added, click OK to save the changes in the Edit Environment Variables window.
- Click OK again in the Environment Variables window, and then click OK in the System Properties window to close it.
Other Interesting Articles
5. Verify PATH Settings
Once you’ve added Python to the PATH, the final step is to verify that the configuration has been done successfully. Here are the steps to check those settings:
- Press the Windows + R button to open the Run dialog box.
- Type cmd and press Enter to open Command Prompt.
- In the Command Prompt window, type the following command and press Enter:
Python
- If Python opens without any issues and you see a Python interactive prompt (often a >>>), then the configuration has been done successfully.
- If you see an error message like:
'python' is not recognized as an internal or external command, operable program, or batch file.
Then this indicates that there is a problem with the PATH settings and you need to double-check the steps you have taken.