Python installation tutorial (Windows latest)

I bought a new laptop a few days ago, so I came up with some software installation and environment configuration tutorials.
This article introduces the detailed installation tutorial of python and the configuration of environment variables . ( If the download is fast, it will be done in two minutes)

1. Find the version you want to install on the official website. Official website address: https://www.python.org/ and
choose to download the windows version.
insert image description here
The latest version is 3.10.1 . Just download the installer , I downloaded the latest version. (If your computer is win7 or XP system, you need to download an older version, he also has a hint on it) insert image description here
If the download is very slow, you can turn on the mobile phone hotspot, connect the computer to the mobile phone hotspot and then download it again, the speed should be better. promote.
Or use a domestic mirror: http://npm.taobao.org/mirrors/python/
choose a version and download the exe file (Windows 64-bit machine)
insert image description here
insert image description here

2. After downloading, double-click to open the exe to start the installation.
insert image description here

Remember to check the Add Python * to PATH below (this will automatically configure the environment variables for you, which is very convenient),
then click install Now and
insert image description here
wait for a while to complete the installation. After the following figure appears, click close.
insert image description here
If you forgot to check Add Python * to PATH, you can manually add environment variables .
Globally search for environment variables
insert image description here
Click on environment variables
insert image description here
Double-click the Path of the user variable and
insert image description here
click Browse, find the location of python, and then click OK. (You can refer to my two paths)
insert image description here
or click New, and then copy the path into it. (Generally the path is C:\Users\your username\AppData\Local\Programs\Python\Python310, where python310 means my python version is 3.10, if yours is 3.7 then it is python37)
If you find If you don't have the AppData folder, you need to let him show hidden items. (mine is win11, the location of win10 is a bit different, but similar)
insert image description here

3. Come and see if the installation is successful
. Press win+r, enter cmd,
insert image description here
enter python, and press Enter . If the version of python you installed appears, the installation is successful, and the environment variables have been configured successfully!
insert image description here
Type print('hello world') to start your python learning journey.
insert image description here
Type exit() to exit.

At the end of this python installation tutorial, we also need a powerful development environment to make it easy for us to write code, please see the next article: pycharm installation tutorial

Related: Python installation tutorial (Windows latest)