Python progress bars

How to install tqdm and fix No module named tqdm

tqdm isn't part of the Python standard library, so you install it from PyPI with pip install tqdm or from conda-forge with conda install -c conda-forge tqdm. The latest release is 4.70.1 (2026-09-11), which needs Python 3.8 or newer. If your script still fails on import, python -m pip install tqdm puts the package into the interpreter you're actually calling.

5 min readtqdm and progress bars

At a glance

  • pip install tqdm installs 4.70.1 from PyPI; it needs Python 3.8+ and only pulls in colorama, on Windows.
  • conda-forge has 4.70.1; Anaconda's default channel has 4.70.0.
  • No module named 'tqdm' almost always means pip and your script use different Pythons: run python -m pip install tqdm.
  • In Jupyter, run %pip install tqdm in a cell, and restart the kernel after an upgrade.

Install with pip

The standard way to get tqdm from PyPI is with pip, and calling pip through your Python executable is the safest habit because it targets that exact interpreter instead of whatever pip happens to sit first on your system path. As of 2026-10-30, this installs tqdm 4.70.1, which needs Python 3.8 or newer (tqdm 4.68.3 dropped Python 3.7). It doesn't pull in much: its only required dependency is colorama, and only on Windows.

Bash
pip install tqdm

# safer: install into the interpreter that runs your script
python -m pip install tqdm

You can also grab optional extras at the same time, or upgrade an existing install:

  • pip install "tqdm[notebook]" adds ipywidgets>=6 so you can render widget bars in Jupyter.
  • pip install "tqdm[telegram]" and "tqdm[discord]" add requests and envwrap, and "tqdm[slack]" adds slack-sdk and envwrap, for the chat integrations.
  • pip install -U tqdm upgrades an older install, which you'll want with pandas 3, since progress_apply needs tqdm 4.67.2 or newer.

Install with conda or uv

If you manage your environments with conda, install tqdm from the conda-forge channel. As of 2026-10-30, conda-forge carries 4.70.1, while Anaconda's default channel is still on 4.70.0.

Bash
conda install -c conda-forge tqdm

If your project uses uv, uv add tqdm records the dependency in pyproject.toml (our test wrote tqdm>=4.70.1) and installs it into the project's virtual environment. uv run then runs your script inside that environment.

Bash
uv add tqdm
uv run python train.py

Fix "ModuleNotFoundError: No module named 'tqdm'"

When you run pip install tqdm and still get ModuleNotFoundError: No module named 'tqdm', the most common cause is that pip belongs to a different Python installation than the one running your script. Compare the interpreter path that Python prints with the path in pip --version:

Bash
python -c "import sys; print(sys.executable)"
pip --version

If they don't point to the same environment, run the install through the interpreter itself with python -m pip install tqdm, using the exact command you run your script with. That forces pip to install into that interpreter.

A few other causes of import errors:

  • Your editor uses another environment: VS Code runs your code with the environment you choose under Python: Select Interpreter, so pick the one where you installed tqdm.
  • A file called tqdm.py: a script with that name in your project hides the real package. Python 3.13 says so in the error: cannot import name 'tqdm' from 'tqdm' (consider renaming '.../tqdm.py' if it has the same name as a library you intended to import). Rename the file.
  • The snap package: snap install tqdm gives you the command line tool only. tqdm's README notes that snap binaries aren't importable, so install with pip or conda to import tqdm.

Jupyter and virtual environments

In a Jupyter notebook, run %pip install tqdm inside a cell rather than !pip install tqdm or a separate terminal. IPython's docs describe %pip as running pip "within the current kernel", while a plain !pip shell escape can point at a different Python on your machine. For widget bars, run %pip install "tqdm[notebook]" so ipywidgets lands in that kernel too.

Python
%pip install tqdm

In our test, %pip printed Note: you may need to restart the kernel to use updated packages. after each install. A first install worked right away. An upgrade didn't: a kernel that had already imported tqdm 4.69.1 still reported 4.69.1 after %pip install tqdm==4.70.1, and a fresh kernel loaded 4.70.1. Restart the kernel after upgrading.

Outside notebooks, a virtual environment keeps tqdm tied to your project's own Python. Create it with python -m venv .venv, activate it, then install:

Bash
python -m venv .venv
source .venv/bin/activate
python -m pip install tqdm

On Windows, activate it with .venv\Scripts\activate.bat in cmd or .venv\Scripts\Activate.ps1 in PowerShell.

Check which version you have

Once tqdm is installed, you have three ways to check the version: import it and print tqdm.__version__, read the package metadata with pip show tqdm, or call the tqdm command line tool with --version.

Bash
python -c "import tqdm; print(tqdm.__version__)"
python -m pip show tqdm
tqdm --version

Each printed 4.70.1 in our test, with pip show reporting Version: 4.70.1. Comparing the python -c result with pip show is also a quick way to confirm that your python and pip commands look at the same environment.

Install commands for every setup

SetupCommandWhat you get
pippython -m pip install tqdm4.70.1 from PyPI, in that interpreter
condaconda install -c conda-forge tqdm4.70.1 (Anaconda defaults: 4.70.0)
uv projectuv add tqdmtqdm>=4.70.1 in pyproject.toml
Jupyter cell%pip install tqdmtqdm in the running kernel's environment
Notebook widgets%pip install "tqdm[notebook]"tqdm plus ipywidgets>=6
Upgradepython -m pip install -U tqdmThe latest release; pandas 3 needs 4.67.2+
Command line onlysnap install tqdm or docker pull tqdm/tqdmThe tqdm CLI, not importable

If you want to watch a bar from your phone without changing how it renders in your terminal, Runpeek's Python package tqdm-live (pip install tqdm-live, Python 3.8+, requires tqdm>=4.60) streams any tqdm bar to a browser. Swap your import to from tqdm_live import tqdm, or call tqdm_live.patch() once before creating a bar.

Each bar then prints a runpeek ▶ https://runpeek.app/b/<uuid> link. Updates go out from a background thread about every 0.75 seconds, network errors never reach your loop, there's no account, and links expire 30 minutes after the last update.

FAQ

Is tqdm part of the Python standard library?

No, tqdm is not in the Python standard library. You install it separately from PyPI with pip, from conda-forge with conda, or with uv.

Which Python versions does tqdm support?

The latest release, tqdm 4.70.1, requires Python 3.8 or newer, since tqdm 4.68.3 dropped Python 3.7. On Python 3.7, pip picks tqdm 4.68.2, the last release that declares support for it.

Do I need to restart the Jupyter kernel after installing tqdm?

Not for a first install: after %pip install tqdm, you can import tqdm in the next cell. After an upgrade, restart the kernel, because a kernel that already imported tqdm keeps using the old version.

How do I upgrade tqdm?

Run python -m pip install -U tqdm to upgrade to the latest release on PyPI, which is 4.70.1 as of 2026-10-30. If you use pandas 3 with progress_apply, you need at least tqdm 4.67.2.

Why does conda install an older tqdm than pip?

Anaconda's default channel has tqdm 4.70.0, while PyPI and conda-forge both have 4.70.1. To get 4.70.1 with conda, use the conda-forge channel: conda install -c conda-forge tqdm.

Why do I get TypeError: 'module' object is not callable?

You imported the package with import tqdm and then called tqdm(...). Use from tqdm import tqdm, or call tqdm.tqdm(...); Python 3.13 suggests the second fix in the error message.

Check on long runs from your phone

Change one import and every tqdm bar prints a link you can open on any device. Get a Discord or Slack message when the run finishes, fails or stalls.

Get a live linkpip install tqdm-live

Sources