01_Python installation and environment variable configuration under Windows

Step one: python download:
Python installation package download address: http://www.python.org/
Insert image description here
Insert image description here
Insert image description here
Step two: python installation:
Double-click the download package to enter the Python installation wizard.
The installation pictures are omitted here, just follow the next step. But please pay attention to one thing. Please install python in the root directory of C drive or D drive, and change the program folder name to python3 (such as C:\python3\)

Step 3: Check whether the installation is successful:
Method 1: Double-click to run the python.exe file, and the following window will pop up, indicating that the installation is successful;
Insert image description here
Method 2: In the WIN start menu, enter "cmd" and type in command: drive letter: \ python installation directory\python.exe, as shown in the figure, taking C drive as an example;
Insert image description here
Note: Ctrl+z exits the python environment.
But it is very troublesome to call up python every time. We only need to complete the environment variable configuration first, and then we can quickly call up the python environment.

How to configure environment variables
Add the Python directory to the environment variables
(1) Right-click "Computer" and click "Properties";
(2) On the control panel homepage, click "Advanced System Settings";
Insert image description here
(3) Select the "System Variables" window Double-click the "Path" below;
Insert image description here
Insert image description here
(4) Then in the "Path" line, add the python installation path (my C:\Python37-32); Note: The path must be separated by a semicolon ";"!
Insert image description here
(5) After the setting is successful, enter the command "python" through the cmd command line to activate the python environment.
Insert image description here
In the next time, you can play happily in the world of python.

Guess you like

Origin blog.csdn.net/dcm1324659876/article/details/132364867