Steps to configure Python environment variables (take Python 3.8 as an example)

**

1. Check the Python 3.8 installation directory.

**
1. Find Python 3.8 in the start menu bar, right click, select "Properties", and open it as shown in the figure.
2. Copy the installation directory at the "start location". For example:
C: \ Users \ Administrator \ AppData \ Local \ Programs \ Python \ Python38 \
**
Insert picture description here

Second, configure Python environment variables.

**
Right-click on the desktop computer "Properties", and then click "Advanced System Settings" → "Advanced" → "Environment Variables". Find Path in the system variable and click "New", enter the variable name "Path", variable value "C: \ Users \ Administrator \ AppData \ Local \ Programs \ Python \ Python38 \;" (that is, the directory where Python is installed), and Just be sure.
Special note: If there is no semicolon at the end of the installation directory, add a semicolon.
At this point, the environment variable configuration is complete!
**
Insert picture description here
Insert picture description here
Insert picture description here

3. Verify the configuration result.

**
win + r opens the run dialog box, enter cmd to open the command line, enter python in the command line, the following shows that the configuration is successful.
Insert picture description here
Insert picture description here

Published 1 original article · liked 0 · visits 6

Guess you like

Origin blog.csdn.net/m0_47184417/article/details/105614844