Importing External Modules
So far, you’ve worked with Python’s built-in modules such as math, random, and datetime.
Beyond these, Python offers a vast ecosystem of external modules developed by the community.
External Modules
External modules are libraries that are not part of Python’s standard library.
Key characteristics include:
- Extending Python’s capabilities for tasks like web scraping, data analysis, visualization, and machine learning
- Being published on the Python Package Index (PyPI)
- Installable via the package manager
pip
You’ll use them whenever you need functionality that isn’t built into Python by default.
Examples
Examples of popular external modules include:
requests— sending HTTP requestsopenpyxl— working with Excel filespandas— performing data analysismatplotlib— creating visualizations
Instead of building everything from scratch, you can import and reuse these modules — saving time and reducing errors.
Quiz
0 / 1
What tool do you use to install external Python modules?
Python external modules can be installed using .
npm
pip
brew
apt
Lecture
AI Tutor
Design
Upload
Notes
Favorites
Help