How to Install plotly in Python

v6.7.0 Data & Science Python >=3.8

An open-source interactive data visualization library for Python

Install pip install plotly

What is plotly?

An open-source interactive data visualization library for Python

See the Python documentation for more examples.

plotly.py is an interactive, open-source, and browser-based graphing library for Python :sparkles:

Built on top of plotly.js, is a high-level, declarative charting library. plotly.js ships with over 30 chart types, including scientific charts, 3D graphs, statistical charts, SVG maps, financial charts, and more.

Quick Start

Minimal example to get started with plotly:

import plotly

print(plotly.__version__)

Installation

pip (standard)

pip install plotly

Virtual environment (recommended)

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

pip3

pip3 install plotly

conda

conda install -c conda-forge plotly

Poetry

poetry add plotly

Dependencies

Installing plotly will also install these packages:

Verify the Installation

After installing, confirm the package is available:

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

ModuleNotFoundError: No module named 'plotly'

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

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

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

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

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

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

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

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 plotly

MemoryError when loading data

Cause: Dataset is too large to fit in RAM.

Fix: Read in chunks, filter columns on load, or consider Polars/Dask for out-of-core processing.

Recent Releases

VersionReleased
6.7.0 latest 2026-04-09
6.6.0 2026-03-02
6.5.2 2026-01-14
6.5.1 2026-01-07
6.5.0 2025-11-17

Full release history on PyPI →

Manage plotly

Upgrade to latest version

pip install --upgrade plotly

Install a specific version

pip install plotly==6.7.0

Uninstall

pip uninstall plotly

Check what is installed

pip show plotly

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