How to install the downloaded module in python

The built-in modules in Python can be used directly, such as os module and sys module.

Before using a third-party module, you need to download and install the module, and then you can import and use it like standard modules and custom modules. Therefore, this section mainly explains how to download and install third-party modules.

To download and install third-party modules, you can use the pip command provided by Python. The syntax format of the pip command is as follows:

pip install module name

Among them, install, uninstall, and list are commonly used command parameters, and their meanings are:

Content expansion:

A Python module is simply a .py file, which can contain any Python code we need. All the programs we have written so far are contained in separate .py files, so they are both programs and modules. The key difference is that the design goal of the program is to run, while the design goal of the module is to be imported and used by other programs.

Not all programs have associated .py files-for example, the sys module is built into Python, and some modules are implemented in other languages (the most common is the C language). However, most of Python library files are implemented in Python. Therefore, for example, we use the statement import collections, and then we can create named tuples by calling collections.namedtuple(), and the functions we access are Implemented in the collections.py module file. For the program, it does not matter which language the module uses, because all modules are imported and used in the same way.

So far, this article on how to install the downloaded module in python is introduced here. For more related python module installation content, please search for the previous articles of ZaLou.Cn or continue to browse the related articles below. Hope you will support ZaLou.Cn more in the future. !

Recommended Posts

How to install the downloaded module in python
How to view the python module
How to install third-party modules in Python
How to learn the Python time module
How to use the round function in python
How to use the zip function in Python
How to install python in ubuntu server environment
How to use the format function in python
How to understand the introduction of packages in Python
How to install Helm in Ubuntu
How to wrap in python code
How to install PHP7.4 in CentOS
How to install mysql in Ubuntu 14.04
How to omit parentheses in Python
How to install Python 3.8 on CentOS 8
How to install Python 3.8 on Ubuntu 18.04
How to write classes in python
How to read Excel in Python
How to install HDP2.6 in Centos7.2
How to view errors in python
How to install mysql in Ubuntu 14.04
How to write return in python
How to understand variables in Python
How to clear variables in python
How to use SQLite in Python
How to find the area of a circle in python
How to install Android SDK in centos7
How to use and and or in Python
python Douban replaces pip to install python module
How to delete cache files in python
How to introduce third-party modules in Python
How to represent null values in python
How to save text files in python
How to write win programs in python
How to run id function in python
How to custom catch errors in python
How to install cuda10.1 driver in Ubuntu
How to write try statement in python
How to define private attributes in Python
How to install ROS Noetic in Ubuntu20.04
R&D: How To Install Python 3 on CentOS 7
How to add custom modules in Python
How does Python handle the json module
How to understand global variables in Python
How to view installed modules in python
How to install Python2 on Ubuntu20.04 ubuntu/focal64
How to open python in different systems
How to sort a dictionary in python
How to add background music in python
How to represent relative path in python
How to install JDK 13 in the Linux environment using compressed packages
How to program based on interfaces in Python
Python uses the email module to send mail
How to simulate gravity in a Python game
How to open the ubuntu system in win10
How to use code running assistant in python
How to enter python through the command line
How to set code auto prompt in python
[Practice] How to install python3.6 on Ubuntu system
Install python in Ubuntu
How to switch the hosts file using python