Registry / data / bokeh
library3.10.0pypypi✓ verified 25d ago

Bokeh is an interactive visualization library for modern web browsers. It helps create versatile, interactive plots, dashboards, and data applications from Python, targeting web browsers for rendering. It is currently at version 3.9.0 and typically releases minor versions every few months with major versions less frequently.

pip install bokeh
INSTALL
IMPORT
SIG · BOKEH
B
bokeh
datapythonv3.10.0
Install
7.1s avg
Import
1871ms
Disk
173MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.9.2 · 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 1.920s · 158MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 7.1s · import 1.822s · 152MB
173MB installed
● package 173MB
Code
Verified usage

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

figure
from bokeh.plotting import figure
show
from bokeh.plotting import show
ColumnDataSource
from bokeh.models import ColumnDataSource
curdoc
from bokeh.io import curdoc
from bokeh.document import curdoc
`curdoc` was moved to `bokeh.io` in Bokeh 3.x.

This quickstart creates a simple interactive sine wave plot and displays it in your default web browser. For more complex interactions or live updates, consider using Bokeh server.

from bokeh.plotting import figure, show from bokeh.models import ColumnDataSource import numpy as np x = np.linspace(0, 4*np.pi, 100) y = np.sin(x) source = ColumnDataSource(data=dict(x=x, y=y)) p = figure(width=600, height=400, title="Simple Sine Wave", x_axis_label='x', y_axis_label='y') p.line('x', 'y', source=source, line_width=2) show(p)
bokeh --version
Debug
Known issues
breakingBokeh 3.x introduced significant breaking changes, most notably the removal of `output_file()`, `output_notebook()`, and `output_server()`. The `show()` function now handles output implicitly based on the environment (e.g., Jupyter, script).
fix
Remove explicit `output_file`/`output_notebook` calls. Rely on `show()` to display the plot. For Bokeh server applications, run `bokeh serve your_app.py`.
affects: >=3.0.0
gotchaFor interactive features like callbacks, linked panning, or dynamic updates, data should be stored in a `ColumnDataSource`. Direct Python lists or NumPy arrays are static and will not update interactively without manual re-rendering.
fix
Always wrap your data in `ColumnDataSource(data=...)` and reference columns by string names (e.g., `p.line('x', 'y', source=source)`).
affects: All versions
gotchaBuilding Bokeh server applications (`bokeh serve`) requires specific structuring using `curdoc()` and callbacks, and cannot be run like a standard Python script that calls `show()` at the end. The server continuously updates the document.
fix
Structure your application logic to add components to `curdoc().add_root()` and define callbacks using `curdoc().on_change()` or `source.on_change()`. Run with `bokeh serve your_app.py`.
affects: All versions
deprecatedThe `gridplot` function is largely superseded by the more flexible `layout`, `row`, and `column` functions for arranging multiple plots or widgets.
fix
Use `from bokeh.layouts import row, column, layout` and compose your plots/widgets using these functions instead of `gridplot`.
affects: >=2.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'bokeh'
The Bokeh library is not installed in the Python environment where the code is being executed, or the environment is not correctly activated.
fix
Install Bokeh using pip: `pip install bokeh` or with conda: `conda install bokeh`.
AttributeError: module 'bokeh.plotting' has no attribute 'show'
The `show` function in Bokeh is intended to be imported directly from `bokeh.plotting` and called with the figure object as an argument, not as a method of the figure object itself.
fix
Correct the import and function call: `from bokeh.plotting import figure, show` then `p = figure(...)` and `show(p)`.
AttributeError: unexpected attribute 'plot_width' to Figure, similar attributes are outer_width, width or min_width
In Bokeh versions 3.0.0 and later, the `plot_width` and `plot_height` arguments for the `figure` function were renamed to `width` and `height` respectively.
fix
Update the `figure()` call to use `width` and `height` instead of `plot_width` and `plot_height`. For example: `p = figure(width=800, height=400)`.
Bokeh plots not showing in Jupyter Notebook
This can be due to not calling `output_notebook()` to configure Bokeh for Jupyter, an outdated Jupyter/Bokeh version, or issues with JupyterLab extensions in older setups.
fix
Ensure `from bokeh.io import output_notebook` and call `output_notebook()` at the beginning of your notebook. Consider upgrading Jupyter Notebook/Lab and Bokeh to the latest versions. For JupyterLab, ensure the `jupyterlab_bokeh` extension is installed if using older Bokeh versions or experiencing persistent issues.
ModuleNotFoundError: No module named 'bokeh.tile_providers'
The `bokeh.tile_providers` module was deprecated in earlier Bokeh versions and fully removed in Bokeh 3.5.0.
fix
Update your code to use `bokeh.tile_utils` instead of `bokeh.tile_providers` for tile provider access, or if using a library like `pandas_bokeh` that relies on the old module, downgrade Bokeh to version 3.4.x or earlier, or consider alternative plotting libraries built on Bokeh that are actively maintained and updated for newer Bokeh versions.
Upgrade
Version history
3.10.0latest on PyPI · released Aug 18, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
30 hits · last 30 days
node
26
OpenAI (training)
1
Resources
bokeh — pip install bokeh · libregistry