Registry / web-framework / ipylab

ipylab

JSON →
library1.1.0pypypi✓ verified 84d ago

ipylab is a Python library that allows direct control and interaction with the JupyterLab environment from within Python notebooks. It provides programmatic access to JupyterLab's features, enabling users to add widgets to the main area, build complex interfaces using Lumino widgets, launch arbitrary commands, and listen to JupyterLab signals to trigger Python callbacks. The library is currently at version 1.1.0 and is actively maintained with a focus on compatibility with recent JupyterLab and ipywidgets versions.

pip install ipylab
INSTALL
IMPORT
SIG · IPYLAB
I
ipylab
web-frameworkpythonv1.1.0
Install
5.3s avg
Import
1843ms
Disk
78MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.0 · 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.920 runs
installs and imports cleanly · install 0.0s · import 1.950s · 85.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 5.3s · import 1.735s · 86MB
78MB installed
● package 78MB
Code
Verified usage

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

JupyterFrontEnd
from ipylab import JupyterFrontEnd

This quickstart demonstrates how to instantiate the JupyterFrontEnd application object and use it to execute a JupyterLab command. A button is created using `ipywidgets`, which, when clicked, triggers the 'notebook:run-all-below' command in the active JupyterLab notebook.

from ipylab import JupyterFrontEnd import ipywidgets as widgets from IPython.display import display app = JupyterFrontEnd() def run_all(event): """Executes the 'notebook:run-all-below' command in JupyterLab.""" print("Executing 'notebook:run-all-below'...") app.commands.execute('notebook:run-all-below') print("Command sent.") button = widgets.Button(description="Run All Below") button.on_click(run_all) display(button)
Debug
Known issues
breakingipylab version 1.0.0 introduced breaking changes by updating its core to be compatible with JupyterLab 4. Older JupyterLab extensions or custom code may require updates.
fix
Ensure your JupyterLab installation is updated to version 4.x. Review the `ipylab` and JupyterLab documentation for specific migration guides if you encounter issues.
affects: >=1.0.0
breakingipylab version 0.6.0 updated its dependency to ipywidgets 8. This change is significant for projects relying on `ipywidgets` functionality, as API changes might be present.
fix
Upgrade `ipywidgets` to version 8.x in your environment. Consult the `ipywidgets` migration guide for details on adapting custom widgets or older code.
affects: >=0.6.0
breakingSupport for Python 3.6 was dropped in ipylab version 0.6.0. Using `ipylab` with Python 3.6 will lead to installation failures or runtime errors.
fix
Ensure your Python environment is running Python 3.8 or newer. Update your environment or create a new one with a supported Python version.
affects: >=0.6.0
gotchaJupyter Widgets (which `ipylab` leverages) might display differently or require specific rendering methods (e.g., in an `iframe`) when used in JupyterLab 4 or Notebook 7 environments.
fix
Test your `ipylab` and `ipywidgets` usage across different JupyterLab/Notebook versions. For interactive widgets, you might need to use `IPython.display.display(IFrame(...))` with embedded HTML for consistent behavior, as described in `ipywidgets` documentation.
affects: All versions with JupyterLab >= 4 or Notebook >= 7
gotchaMismatched versions of JupyterLab, `ipywidgets`, or the `jupyterlab_widgets` extension can lead to `ipylab` widgets not appearing or functioning correctly without explicit error messages.
fix
Always install `ipylab` within the same `conda` or `pip` environment as your JupyterLab and `ipywidgets` installation. Ensure all packages are up-to-date or compatible according to their release notes. A fresh environment setup often resolves these issues.
affects: All versions
Errors
Common errors & fixes
Error: Module ipylab, semver range ^X.Y.Z is not registered as a widget module.
This error typically indicates that the JupyterLab extension for `ipylab` (or `ipywidgets`) is not properly installed, enabled, or recognized by your JupyterLab frontend.
fix
Ensure that `jupyterlab` and `ipylab` (and `ipywidgets`) are installed in the same environment. If installed via `pip`, JupyterLab usually handles the frontend extension automatically, but sometimes a manual `jupyter lab build` or `jupyter labextension install @jupyter-widgets/jupyterlab-manager` might be needed for older JupyterLab versions or specific setups. Restart JupyterLab after installation.
ipywidgets not working / widgets not appearing (no output or only text description)
This is often caused by an incompatibility between the versions of JupyterLab and `ipywidgets`, or if the JupyterLab manager for widgets is not correctly installed or enabled.
fix
Verify that your `ipywidgets` version is compatible with your JupyterLab version (e.g., `ipywidgets` 8.x for JupyterLab 4.x). Ensure `jupyterlab_widgets` is installed. Try `pip install --upgrade jupyterlab ipywidgets` and then `jupyter lab build` to refresh the frontend assets. Restart your JupyterLab server.
Command 'jupyter' not found
The `jupyter` command-line tool is not found in your system's PATH environment variable. This means that the shell cannot locate the executable.
fix
Ensure that the directory containing the `jupyter` executable (often `~/.local/bin` for pip user installs or `<conda_env_path>/bin/` for conda) is included in your system's PATH. Alternatively, you can explicitly call the executable by its full path, e.g., `~/.local/bin/jupyter lab`.
Upgrade
Version history
1.1.0latest on PyPI · released Jun 24, 2025
Audit
Dependencies
jupyterlabrequired`ipylab` directly controls JupyterLab. Version 1.0.0 brought compatibility with JupyterLab 4.
ipywidgetsrequired`ipylab` is built on top of Jupyter Widgets for its frontend interaction. Version 0.6.0 updated to ipywidgets 8.
pythonrequiredMinimum Python version requirement.
Agent activity
8 hits · last 30 days
node
8
Resources
ipylab — pip install ipylab · libregistry