Install & Compatibility
Where this runs
tested against v1.9.4 · 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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 3.856s · 364.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 14.0s · import 3.672s · 354MB
361MB installed
● package 361MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
panel
✓ import panel as pn
Standard conventional import alias.
extension
✓ pn.extension()
✗ Forgetting pn.extension() in notebooks
Required in Jupyter/IPython notebooks to load JavaScript dependencies and configure Panel for bidirectional communication. [6, 19]
This quickstart creates a simple 'Hello, Panel!' Markdown pane and makes it servable. When run in a Jupyter notebook, it will display directly. When saved as a Python file (e.g., `app.py`) and executed with `panel serve app.py --dev` from the terminal, it launches a web server displaying the app. [6]
import panel as pn
pn.extension()
# Create a simple Panel component
hello_world_pane = pn.pane.Markdown("## Hello, Panel!")
# Display the component in a server app
# In a Jupyter/IPython notebook, this will display the app inline.
# To serve as a standalone app, save as `app.py` and run `panel serve app.py --dev`
hello_world_pane.servable()
panel --version
Debug
Known issues
gotchaAlways call `pn.extension()` in Jupyter/IPython notebooks. Forgetting this can lead to unexpected display issues or lack of interactivity, as it sets up crucial JavaScript dependencies and communication channels. [19]fixEnsure `pn.extension()` is called at the beginning of your notebook or script when developing in a notebook environment.
affects: All versions
gotchaAvoid mutable default arguments in functions or methods used with Panel's reactivity, especially if they are modified. Python evaluates default arguments once when the function is defined, leading to shared state across calls if the default is mutable (e.g., a list or dictionary). [20, 21]fixUse `None` as a default argument and initialize the mutable object inside the function if `None` is detected (e.g., `def func(data=None): if data is None: data = []`).
affects: All versions
gotchaBe cautious when using `watch=True` with `param.depends` decorators on methods that are already displayed in a Panel layout. Panel automatically monitors dependencies for displayed components, and explicitly setting `watch=True` can cause the method to be invoked twice. [8]fixReserve `watch=True` for callbacks that are not otherwise being monitored by a Panel layout. For methods directly passed to a Panel layout (e.g., `pn.Column(obj.view)`), it's generally not needed.
affects: All versions
gotchaFrequent updates to Panel and its underlying dependencies (like Bokeh, Plotly, Vega, Tabulator) mean that specific versions of these libraries might be required for optimal compatibility. For example, recent releases often include fixes for compatibility with newer Bokeh versions. [14, 15]fixRefer to Panel's release notes and documentation for recommended or required dependency versions, especially when encountering unexpected rendering or interactivity issues after upgrading.
affects: All 1.x versions
gotchaUsing `pn.panel()` is convenient for displaying various Python objects, but for performance-critical applications, it's often more efficient to directly use specific `pn.pane` types (e.g., `pn.pane.Markdown`, `pn.pane.Plotly`) if you know the object type. `pn.panel()` uses a heuristic that might not always be the most performant. [10]fixFor complex or high-performance apps, explicitly choose the appropriate `pn.pane` class rather than relying solely on `pn.panel()`.
affects: All 1.x versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'panel'
This error occurs when the 'panel' library is not installed in the Python environment, or the Python interpreter cannot find it.
fixInstall the Panel library using pip: `pip install panel` or with conda: `conda install -c conda-forge panel`.
Javascript error adding output! TypeError: Cannot read property 'comm_manager' of undefined
This error typically occurs in Jupyter notebooks (or similar environments) when `pn.extension()` has not been called, which is necessary to set up the communication channels between Python and JavaScript for Panel components.
fixEnsure you run `pn.extension()` at the beginning of your notebook or script, usually in the first cell, before creating any Panel components: `import panel as pn; pn.extension()`.
ERROR:bokeh.server.views.ws:Refusing websocket connection from Origin 'http://...'
This error happens when attempting to access a Panel application served by `pn.serve` from an origin (IP address/port) that is not explicitly allowed by the Bokeh server's security settings.
fixWhen serving your application, explicitly allow the origin(s) from which you expect connections. For example, to allow all origins during development, use `pn.serve(app, websocket_origin=['*'])` or specify a list of allowed origins: `pn.serve(app, websocket_origin=['localhost:5000', '192.168.1.100:8000'])`.
TypeError: Object of type X is not JSON serializable
This general Python error arises in Panel when you attempt to pass an object that cannot be converted into a JSON format to a widget or a part of the Panel application that expects JSON-serializable data. This often happens with custom classes, database objects, or complex data structures that Panel doesn't know how to serialize automatically.
fixEnsure that any objects you pass to Panel components, especially widgets or reactive functions, are either standard Python types (like strings, numbers, lists, dictionaries) or objects that Panel (or its underlying libraries like Bokeh) can inherently serialize. If you have custom objects, you may need to extract the relevant serializable data or provide a custom serialization method before passing it to Panel.
Upgrade
Version history
1.9.4latest on PyPI · released Aug 17, 2026
Audit
Dependencies
bokehrequiredPanel uses Bokeh Server by default for serving apps and for rendering many interactive components. [1, 19]
paramrequiredParam is foundational to Panel's reactivity, providing super-charged attributes and a dependency system. [3, 9]
pandasoptionalCommonly used for data handling and integration with data tables. [13]
holoviewsoptionalMember of the HoloViz ecosystem; provides a powerful plotting API often used with Panel. [3, 10]
hvplotoptionalMember of the HoloViz ecosystem; provides a high-level plotting API for dataframes, built on HoloViews. [3, 10]
plotlyoptionalSupported plotting integration, though can have regressions in specific Panel versions. [15]