Python: List All Packages at a Glance

Noah Jul 31, 2026

Python, with its extensive standard library and a immense collection of third-party packages, offers a vast array of functionalities for developers. These packages, modules, and libraries simplify complex tasks, boost productivity, and offer pre-built solutions for common problems. Let's explore how to list all packages in Python.

Python list methods reference chart
Python list methods reference chart

Before we delve into the methods, it's crucial to understand that Python's package ecosystem comprises various formats - built-in modules, pip-installable packages, wheels, and eggs. Listing all packages might not provide a comprehensive view due to the dynamic nature of some packages. Thus, we'll focus on listing Python's built-in and pip-installable packages.

Secure Python Packages Built From Source | ActiveState
Secure Python Packages Built From Source | ActiveState

Listing Built-in Modules

Python's standard library, also known as the Python Standard Library (PSL), includes various built-in modules that are available right after you install Python. Let's see how to list all the built-in modules.

All Important Python Functions for Beginners (Complete Cheat Sheet)
All Important Python Functions for Beginners (Complete Cheat Sheet)

Python provides a simple and straightforward way to list all the built-in modules using the dir() function and the * wildcard.

Using dir()

Python list methods every developer should know.
Python list methods every developer should know.

The dir() function, when used with '*' as an argument, lists all the built-in modules. Here's how you can use it:

```python import dir print(dir('*')) ```

The output will be a list of all the built-in modules, directories, functions, etc.

Using pydoc

python
python

Python's built-in documentation module, pydoc, also allows listing all modules. You can use it as follows:

```bash pydoc -k '^_' ```

The output will display all modules and functions starting with an underscore, which typically indicates they are part of the standard library.

Listing Pip-Installable Packages

Python Cheat Sheet for Beginners 2026 | Python Basics, Syntax, Loops, Functions & Variables
Python Cheat Sheet for Beginners 2026 | Python Basics, Syntax, Loops, Functions & Variables

Python's package installer, pip, is widely used to manage third-party packages. Listing pip-installable packages helps you understand the dependencies and available functionalities. Here's how to list them.

To list all installed packages, you can use the following command in your terminal or command prompt:

Python Modules & Packages Roadmap (2026) | Complete Guide for Beginners
Python Modules & Packages Roadmap (2026) | Complete Guide for Beginners
Python Lists with Examples
Python Lists with Examples
the data science packages list is shown in blue and yellow, with text below it
the data science packages list is shown in blue and yellow, with text below it
a table with numbers and symbols on it, including the list for each item in the text
a table with numbers and symbols on it, including the list for each item in the text
Python list indexing tutorial guide
Python list indexing tutorial guide
Python List Methods Everyone Must Know
Python List Methods Everyone Must Know
Python important methods - Programming
Python important methods - Programming

``` pip list ```

This command returns a list of all installed packages along with their versions. However, this might not reflect the entire Python ecosystem as it only lists the packages installed in the current environment.

Using pip list --outdated

If you want to see outdated packages, you can use the --outdated flag:

``` pip list --outdated ```

This helps you identify packages that need updates.

Using requirements.txt

Another approach is to use a requirements.txt file. This file lists all packages and their respective versions needed for a project. You can create it manually or generate it using:

``` pip freeze > requirements.txt ```

This command locks all installed packages and their versions in a requirements.txt file, making it easy to reinstall them or share the project's dependencies.

Python's vast ecosystem can be overwhelming, but understanding how to list packages simplifies dependency management and exploring the available functionalities. By mastering these methods, you can harness the full power of Python's package ecosystem.