1. Download Python3.9.1
Python installation package download address: www.python.org/downloads/
Open the link and click the version number or Download button in the image below to go to the corresponding version Download page. Scroll to the end to see the Python installation packages for each platform.
Click here to install the latest version of Python 3.9.1
Description of prefixes:
-
Windows Installer (64-bit) is the 64-bit Python installer;
-
Windows Installer (32-bit) is the 32-bit Python installer.
Description of suffixes:
embeddable zip file
said.zip
A green installation-free version of the format that can be embedded (integrated) directly into other applications;executable installer
said.exe
Format executable program, this is a complete offline installation package, generally select this can;web-based installer
It is installed over the network, that is, it is an empty shell. During the installation process, you need to download the real Python installation package from the Internet.
Here I have chosen the Windows Installer (64-bit), which is the full 64-bit offline installation package.
2. Install Python3.9.1
Python Installation Wizard
To install Python, double-click python-3.9.1-amd64.exe
Select Add Python 3.9 to PATH to Add the Python command tool directory to the system PATH environment variable, which will be very convenient for developing programs or running Python commands later.
Python supports two installation modes, default and custom:
- By default, all components are selected and installed on drive C.
- Custom installation allows you to manually select components to be installed and install them to a specified drive letter.
Here we choose custom installation. Click Customize Installation to proceed to the next step
Select the Python components to install
- Documentation of offline
.chm
Format document, must be retained. English alsoOK
Friends can read this document directly, more reliable than all the books. If you are under pressure to read English, it is good to check the usage of standard library modules. - PIP Python package download tool, must be retained.
- TCL/TK and IDLE, it’s a long story.
- Python Test Suite, this can be done without, of course, it is ok to stay.
- Py the launcher. The extra thing to notice here
for all user
Option to choose whether to install for all users. If installed for all users, yesadministrator
The permissions.
If there are no special requirements, keep the default, that is, check all the boxes.
Select an Installation Directory
Click Next to continue and select the installation directory.
- Install for all user, whether to Install for all. If yes, yes
administrator
And the installation path will be different. - Associate the file to Python and leave it as it is. It is the
.py
Files andpython
Program associated with this double click.py
When you file, it’s automatically usedpython
To execute. - Create a shortcut and leave it as it is.
- Add Python to environment variables, second chance for modification
- Precompiled standard library, a one-time standard library
.py
It’s all precompiled.pyc
, not necessary, will take more time to install, do not choose - Download debug XXX (download debug XXX
Note: The installation path folder name cannot contain Chinese characters
Select your usual installation directory, click Install, and wait a few minutes.
The automatic limit on the Path length is disabled
The Disable Path Length limit button will appear at the end of the installation. Click the button to Disable the system’s automatic path length limit, which saves a lot of trouble.
Click Close to complete the Python installation
3. Verify that the installation is successful
After the installation, open the Windows COMMAND line program (command prompt), press Windows+R, and enter CMD to enter the DOS window
Enter the Python command in the window (note that the letter P is lowercase). If the Python version information is displayed and the command prompt >>> is displayed, the installation is successful.
Run Python commands
Running python commands launches the Python interactive programming environment, where you can type code after >>> and see the results immediately.
Write code in a Python interactive environment
Press Ctrl+Z or enter exit() to exit the interactive programming environment and return to the Windows command line. If you are interested in Python, you are welcome to join us and get free learning materials and source code.