How to Install rich in Python
Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal
pip install rich
What is rich?
Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal
English readme • 简体中文 readme • 正體中文 readme • Lengua española readme • Deutsche readme • Läs på svenska • 日本語 readme • 한국어 readme • Français readme • Schwizerdütsch readme • हिन्दी readme • Português brasileiro readme • Italian readme • Русский readme • Indonesian readme • فارسی readme • Türkçe readme • Polskie readme
Rich is a Python library for rich text and beautiful formatting in the terminal.
The Rich API makes it easy to add color and style to terminal output. Rich can also render pretty tables, progress bars, markdown, syntax highlighted source code, tracebacks, and more — out of the box.
Quick Start
Minimal example to get started with rich:
from rich.console import Console
from rich.table import Table
console = Console()
console.print("[bold green]Hello, World![/bold green]")
table = Table(title="Users")
table.add_column("Name")
table.add_column("Age")
table.add_row("Alice", "30")
console.print(table)
Installation
pip (standard)
pip install rich
Virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install rich
pip3
pip3 install rich
conda
conda install -c conda-forge rich
Poetry
poetry add rich
Dependencies
Installing rich will also install these packages:
Verify the Installation
After installing, confirm the package is available:
python -c "import rich; print(rich.__version__)"
If this prints a version number, installation succeeded. If you see a ModuleNotFoundError, see the errors section below.
Installation Errors
Common errors when installing rich with pip.
ModuleNotFoundError: No module named 'rich'
Cause: The package is not installed in the current Python environment.
Fix: Run pip install rich. If using a virtual environment, ensure it is activated first.
ModuleNotFoundError: No module named 'rich' (installed but still failing)
Cause: pip installed the package into a different Python than the one running your script.
Fix: Use python -m pip install rich to install into the interpreter you are running.
ImportError: cannot import name 'X' from 'rich'
Cause: The function or class does not exist in the installed version.
Fix: Check the version with pip show rich and upgrade with pip install --upgrade rich.
pip: command not found
Cause: pip is not in PATH or Python was not added to PATH during installation.
Fix: Try python -m pip install rich. On macOS/Linux try pip3.
PermissionError: [Errno 13] Permission denied
Cause: No write access to the system Python package directory.
Fix: Use a virtual environment, or add --user: pip install --user rich
SSL: CERTIFICATE_VERIFY_FAILED
Cause: pip cannot verify PyPI's SSL certificate — common behind corporate proxies.
Fix: Try: pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org rich
Recent Releases
| Version | Released |
|---|---|
14.3.4 latest |
2026-04-11 |
14.3.3 |
2026-02-19 |
14.3.2 |
2026-02-01 |
14.3.0 |
2026-01-24 |
14.3.1 |
2026-01-24 |
Manage rich
Upgrade to latest version
pip install --upgrade rich
Install a specific version
pip install rich==14.3.4
Uninstall
pip uninstall rich
Check what is installed
pip show rich