description |
---|
This module introduces the concept of third-party modules and how to install them. |
This refers to a module that is not part of the Python Standard Library. These modules are developed by third-party developers and are available for use in your Python programs. They are usually installed using the Python Package Manager, pip
.
To install a third-party module, you need to know the name of the module and use the following syntax:
pip install <module_name>
For example, to install the requests
module, you would use the following command:
pip install requests
Note: You may need to use
pip3
instead ofpip
depending on your system configuration as well as need to usesudo
before thepip
command depending on your system configuration.
Note: You need to create a virtual environment before installing third-party modules. You can learn more about virtual environments in the Python Virtual Environments module.
Once you have installed a third-party module, you can use it in your Python programs. For example, to use the requests
module, you would use the following syntax:
import requests