First, go to Python official website to download Python 3.11. You can also download it from the Microsoft Store, which means you don't need to manually configure environment variables.
You can also click on the one we have downloaded: python 3.11.9
Check "Add python.exe to PATH" to add Python to the environment variables of the system.
Select the installation path you want, click "Customize installation", and refer to the following figure for other configurations:
Once the installation is complete, check if the installation is successful Open the command line: win+r -> enter cmd ①.Enter python --version and the python version number appears, which means that the installation is successful ②.Type where python to see where python is installed The Python environment under the C drive is the Python environment that is automatically installed when VS Code is installed; The Python environment installed in the above steps is on the E disk