Registry / observability / tqdm
library4.70.0pypypi✓ verified 26d ago

tqdm is a highly popular Python library that provides fast and extensible progress bars for loops and other iterable constructs. The name 'tqdm' is derived from the Arabic word 'taqaddum' (progress) and also stands for 'te quiero demasiado' (I love you so much). It seamlessly integrates with various Python libraries and environments, including Jupyter notebooks and command-line interfaces, allowing developers to easily monitor the progress of long-running tasks. The current stable version is 4.67.3, with frequent patch releases addressing bug fixes, performance enhancements, and compatibility updates.

pip install tqdm
INSTALL
IMPORT
SIG · TQDM
T
tqdm
observabilitypythonv4.70.0
Install
1.7s avg
Import
138ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.70.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.148s · 18.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.128s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

tqdm
from tqdm import tqdm
import tqdm
Importing `tqdm` as a module (`import tqdm`) requires using `tqdm.tqdm()` to wrap iterables, which is less common. Directly importing the `tqdm` function (`from tqdm import tqdm`) is the standard practice.
trange
from tqdm import trange
A convenient shortcut for `tqdm(range(N))`.
tqdm
from tqdm.notebook import tqdm
For displaying rich, interactive progress bars within Jupyter Notebooks and other IPython environments. Requires `ipywidgets`.
tqdm
from tqdm.auto import tqdm
Automatically selects between console (`tqdm.tqdm`) and notebook (`tqdm.notebook`) progress bars based on the environment.

Wrap any iterable with `tqdm()` to instantly display a progress bar. For convenience with `range`, use `trange()`. For pandas DataFrames, register `tqdm.pandas()` and then use `progress_apply()` or `progress_map()`.

import time from tqdm import tqdm for i in tqdm(range(100), desc="Processing items"): time.sleep(0.05) print("Done!") # For pandas integration: # import pandas as pd # import numpy as np # from tqdm.auto import tqdm # tqdm.pandas() # df = pd.DataFrame(np.random.randint(0, 100, (100, 3))) # df.progress_apply(lambda x: x * 2)
tqdm --version
Debug
Known issues
breakingThe `tdqm` package (version 0.0.1) on PyPI is an alias for typos of `tqdm` and does not provide the actual `tqdm` functionality. Installing `tdqm` will not give you the progress bar library.
fix
Always install `tqdm` using `pip install tqdm`. If you've installed `tdqm`, uninstall it with `pip uninstall tdqm`.
affects: All versions
gotchaWhen using `tqdm` with Python's `multiprocessing` module, progress bars may not update correctly or can lead to 'endless loop of errors' if the multiprocessing pool is not properly initialized.
fix
Always encapsulate your main code within a function and call it under an `if __name__ == "__main__":` guard to ensure correct process initialization.
affects: All versions
gotchaIn Jupyter Notebooks and similar interactive environments, progress bars might not update immediately due to output buffering.
fix
Use `from tqdm.notebook import tqdm` or `from tqdm.auto import tqdm` for Jupyter-specific, interactive widgets. Ensure `ipywidgets` is installed.
affects: All versions
deprecatedThe `gui` module (e.g., `tqdm.gui`) for Matplotlib GUI progress bars has experienced syntax fixes and is generally considered experimental.
fix
Update to `tqdm>=4.67.1` for fixes, but be aware that GUI integrations can be less stable than console/notebook bars. Consider alternative display methods if encountering persistent issues.
affects: <4.67.1
gotchaIf your iterable has an unknown length (e.g., a generator), `tqdm` cannot calculate percentage or estimated time unless the `total` parameter is explicitly provided.
fix
If the total number of iterations is known, provide it as `tqdm(my_generator(), total=known_total)`. Otherwise, the bar will only show the count of completed iterations.
affects: All versions
breakingThe `cli` module in versions prior to `v4.66.3` had an `eval` safety vulnerability (CVE-2024-34062, GHSA-g7vv-2v7x-gj9p).
fix
Upgrade `tqdm` to version `4.66.3` or newer immediately.
affects: <4.66.3
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'tdqm'
You likely mistyped `tqdm` as `tdqm` in your import statement. While a `tdqm` package exists on PyPI, it's a placeholder for common typos and does not provide `tqdm`'s functionality.
fix
Correct the import statement to `from tqdm import tqdm` or `import tqdm`. Ensure you have installed the correct package: `pip install tqdm`.
AttributeError: module 'tqdm' has no attribute 'tqdm' (when using `import tqdm` then `tqdm(range(...)))`
When you use `import tqdm`, you're importing the `tqdm` *module*. The `tqdm` function itself is an attribute of this module.
fix
Change your import to `from tqdm import tqdm` to directly import the function, or explicitly call `tqdm.tqdm(range(...))` if you prefer the module import.
Progress bar does not update in Jupyter/VS Code/Cloud environment.
Output buffering in certain environments (like Jupyter, VS Code integrated terminal, or cloud logs) can prevent `tqdm` from redrawing the progress bar in place.
fix
For Jupyter: use `from tqdm.notebook import tqdm` (requires `ipywidgets`). For some cloud logging: set `TQDM_POSITION=-1` environment variable. Ensure the Python interpreter selected in your IDE matches where `tqdm` is installed.
TypeError: Progress.reset() missing 1 required positional argument: 'task_id' (specifically with `tqdm.rich` integration)
This indicates an incompatibility or bug in how `tqdm`'s experimental `rich` integration handles the `reset()` method, specifically not passing a required `task_id` to `rich.progress.Progress.reset()`.
fix
This issue might be resolved in newer `tqdm` versions. Update `tqdm` to the latest stable release. If the problem persists, it may be a known bug in the experimental `tqdm.rich` module, consider using standard `tqdm` or `tqdm.notebook` for stability.
Upgrade
Version history
4.70.0latest on PyPI · released Jul 27, 2026
Audit
Dependencies
pandasoptionalFor progress bars on DataFrame operations like `progress_apply` and `progress_map`.
ipywidgetsoptionalRequired for interactive progress bars in Jupyter notebooks (`tqdm.notebook`).
richoptionalFor integration with `rich` beautiful terminal output (via `tqdm.rich`).
Agent activity
28 hits · last 30 days
node
22
OpenAI (training)
1
Resources
tqdm — pip install tqdm · libregistry