How to Install altair in Python

v6.0.0 CLI & Utilities Python >=3.9

Vega-Altair: A declarative statistical visualization library for Python.

Install pip install altair

What is altair?

Vega-Altair: A declarative statistical visualization library for Python.

Vega-Altair is a declarative statistical visualization library for Python. With Vega-Altair, you can spend more time understanding your data and its meaning. Vega-Altair's API is simple, friendly and consistent and built on top of the powerful Vega-Lite JSON specification. This elegant simplicity produces beautiful and effective visualizations with a minimal amount of code.

Vega-Altair was originally developed by Jake Vanderplas and Brian Granger in close collaboration with the UW Interactive Data Lab. The Vega-Altair open source project is not affiliated with Altair Engineering, Inc.

See Vega-Altair's Documentation Site as well as the Tutorial Notebooks. You can run the notebooks directly in your browser by clicking on one of the following badges:

Quick Start

Minimal example to get started with altair:

import altair

print(altair.__version__)

Installation

pip (standard)

pip install altair

Virtual environment (recommended)

python -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate
pip install altair

pip3

pip3 install altair

conda

conda install -c conda-forge altair

Poetry

poetry add altair

Dependencies

Installing altair will also install these packages:

Verify the Installation

After installing, confirm the package is available:

python -c "import altair; print(altair.__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 altair with pip.

ModuleNotFoundError: No module named 'altair'

Cause: The package is not installed in the current Python environment.

Fix: Run pip install altair. If using a virtual environment, ensure it is activated first.

ModuleNotFoundError: No module named 'altair' (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 altair to install into the interpreter you are running.

ImportError: cannot import name 'X' from 'altair'

Cause: The function or class does not exist in the installed version.

Fix: Check the version with pip show altair and upgrade with pip install --upgrade altair.

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 altair. 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 altair

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 altair

Recent Releases

VersionReleased
6.1.0.dev20260406 2026-04-06
6.1.0.dev20260330 2026-03-30
6.1.0.dev20260323 2026-03-23
6.1.0.dev20260316 2026-03-16
6.1.0.dev20260309 2026-03-09

Full release history on PyPI →

Manage altair

Upgrade to latest version

pip install --upgrade altair

Install a specific version

pip install altair==6.0.0

Uninstall

pip uninstall altair

Check what is installed

pip show altair

Last updated: 2026-04-11 • Data from PyPI