Download and install Python 3.11.0 and use help to view module information (Win11)

Download and install Python 3.11.0

Python official website: Welcome to Python.org 

Official website homepage, Downloads menu.

 

Click "Python 3.11.0" to start downloading the installation package. After the download is complete, you will get the file "python-3.11.0-amd64.exe".

 

Double-click the file to start the installation,

 

Check "Add Python.exe to PATH" first, then click "Customize installation".

 

 

Specify the installation location "d:\Programs\Python\Python311". Click "Install".

 

After waiting for a while, the installation is complete.

 

Click "Close" to complete the installation.

After the installation is complete, several new menu items are added to the Windows Start menu:

The screenshot of the installation directory information is as follows:

 

 

Use help to view module information on the command line

In Windows, you can click "Python 3.11 Module Docs" in the start menu to view it in the window.

But it is more convenient to view it on the command line.

Since the installation directory of Python is added to the system variable PATH during installation, it can be directly entered on the command line.

Enter the command python in sequence on the command line to enter Python. Type the following commands in sequence

help()

modules

All modules of Python can be displayed.

There are about 300 module names displayed. As shown in the following table, when the command line prompt is "help>", enter the module name to display the detailed information of the module. For example, if you type pip, the effect after the command is executed is shown in the figure below:

 

NAME (module name), PACKAGE CONTENTS (package content), FUNCTIONS (function), DATA (data), VERSION (version number), FILE (file, including the directory) are listed .

When the command line prompt is "help>", press the Enter key to return to the Python command line, and the prompt changes to ">>>".

You can use the import, dir, print, help commands to display some information about the package (module), as shown in the following figure:

The commands to type in are as follows:

import pip

say (beep)

help(pip.main)

Related references:

  1. The official version of Python 3.11 is here, 10-60% faster than 3.10, official: this may be the best version. https://www.toutiao.com/article/7158328079793013288/?log_from=b56466eb0a54_1667218455520 
  2. Python official website: Welcome to Python.org 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/Alexabc3000/article/details/127623903