W11 manually add python environment variables

W11 manually add python environment variables

Add python variables in Windows 11

1. Download of python 3.9.13

The first is to download python. You can download the python version you need directly from the official website.
Link: https://www.python.org/downloads/windows/

2. Find the Add Environment Variables window

  1. Click Settings–>System–>System Information
    system message
  2. Scroll down to find the advanced system settings (you can directly search for the advanced system settings and you can also find it----the same is true for w10)
    Insert image description here
  3. Click Environment Variables
    environment variable
    4. You can see that there are user variables and system variables.
    Insert image description here

3. Find the python installation path

Copy the installation path C:\Program Files\Python39 and C:\Program Files\Python39\Scripts
path

4. Add the two paths (values) to the Path variable

First, let’s distinguish between user variables and system variables . User variables refer to Path variables that can be used by the current Windows login user, while system variables refer to more advanced administrator identities. It is roughly equivalent to the hierarchical management of Linux. So generally if you only use one Windows user, there will be no difference between the two.
1. Select the Path variable. Then click the Edit button
Insert image description here
2. After clicking New , copy the above two paths
Insert image description here
Insert image description here

5. Verify whether the addition is successful

1. Re-open cmd (win key + R) , enter python , and the version information will be displayed.
Insert image description here
2. You can enter python [filename].py for testing.
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_45765073/article/details/125090676