{"id":651,"library":"jupyterlab-widgets","title":"JupyterLab Widgets Extension","description":"`jupyterlab-widgets` is the JupyterLab frontend extension that provides the necessary framework for rendering interactive `ipywidgets` within JupyterLab notebooks and interfaces. It enables the rich interactive experiences defined by the core `ipywidgets` Python library. As of version 3.0.16, this extension is compatible with JupyterLab 3 and 4, and for many modern setups, it is automatically handled or included when `ipywidgets` is installed.","status":"active","version":"3.0.16","language":"python","source_language":"en","source_url":"https://github.com/jupyter-widgets/ipywidgets","tags":["jupyter","widgets","frontend","interactive","jupyterlab","ipywidgets"],"install":[{"cmd":"pip install jupyterlab-widgets","lang":"bash","label":"JupyterLab Widget Extension"},{"cmd":"pip install ipywidgets","lang":"bash","label":"Core Widget Library (commonly sufficient for Lab 3+)"}],"dependencies":[{"reason":"Provides the core Python API and logic for interactive widgets that this extension renders.","package":"ipywidgets","optional":false},{"reason":"The integrated development environment where this extension operates.","package":"jupyterlab","optional":false}],"imports":[{"note":"The `jupyterlab-widgets` package is a JupyterLab frontend extension. User-facing Python imports for creating and using interactive widgets are provided by the `ipywidgets` library, which this extension enables in JupyterLab.","symbol":"Button","correct":"from ipywidgets import Button, IntSlider, interact"},{"note":"While `ipywidgets` creates the widget objects, `IPython.display.display` is often used to explicitly render widgets in contexts where they might not automatically show up (e.g., when not the last expression in a cell).","symbol":"display","correct":"from IPython.display import display"}],"quickstart":{"code":"from ipywidgets import IntSlider, interact\nfrom IPython.display import display\n\ndef f(x):\n    print(x)\n\n# Create a slider widget\nslider = IntSlider(min=0, max=100, step=1, description='Value:')\ndisplay(slider)\n\n# Or use interact for quick interactive functions\ninteract(f, x=10);","lang":"python","description":"This quickstart demonstrates how to create and display a simple integer slider using `ipywidgets`, which `jupyterlab-widgets` enables in JupyterLab. It also shows the `interact` function for automatically creating widgets for function arguments."},"warnings":[{"fix":"When developing, import widget classes and functions from `ipywidgets`. Ensure both `ipywidgets` and `jupyterlab-widgets` are installed for proper rendering in JupyterLab.","message":"It is important to distinguish between `jupyterlab-widgets` and `ipywidgets`. `ipywidgets` is the core Python library for defining and creating interactive widgets, while `jupyterlab-widgets` is the JupyterLab frontend extension responsible for rendering these widgets. Users primarily interact with `ipywidgets` in their Python code.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For JupyterLab 3.0 and newer, `pip install ipywidgets` is usually sufficient. If issues persist, ensure `jupyterlab-widgets` is also explicitly installed via `pip install jupyterlab-widgets` and check `jupyter labextension list` for its status. For older JupyterLab versions, consult the `jupyterlab-widgets` PyPI page for specific `jupyter labextension install` commands.","message":"JupyterLab version compatibility for the `jupyterlab-widgets` extension has historically required specific installation steps. For JupyterLab 1 or 2, manual `jupyter labextension install` was often necessary. JupyterLab 3.0+ and `ipywidgets>=7.6.0` typically handle the extension automatically, but compatibility issues can still arise, especially with major JupyterLab upgrades (e.g., to JupyterLab 4).","severity":"breaking","affected_versions":"< JupyterLab 3.0"},{"fix":"Ensure `jupyterlab-widgets` is present in the JupyterLab environment and `ipywidgets` in the kernel environment. Use `conda list` or `pip list` in both environments to verify.","message":"If JupyterLab and your Python kernel (with `ipywidgets`) are installed in separate virtual environments (e.g., using different Conda environments), `jupyterlab-widgets` must be installed in the environment where JupyterLab is running, and `ipywidgets` must be installed in each kernel's environment that will use widgets.","severity":"gotcha","affected_versions":"All versions with isolated environments"}],"env_vars":null,"last_verified":"2026-05-12T17:16:31.736Z","next_check":"2026-06-26T00:00:00.000Z","problems":[{"fix":"Ensure `ipywidgets` and `jupyterlab_widgets` are installed in the correct environment (e.g., `pip install ipywidgets jupyterlab_widgets` or `conda install -c conda-forge ipywidgets jupyterlab_widgets`). For JupyterLab 3.0+ and `ipywidgets` 7.6+, the extension should be enabled automatically, but restarting JupyterLab and your browser, or trying a clean reinstall, can resolve caching or environment issues. For older JupyterLab versions, manual installation via `jupyter labextension install @jupyter-widgets/jupyterlab-manager` might be required after installing `nodejs`.","cause":"The JupyterLab frontend extension for ipywidgets is either not properly installed, enabled, or there's a version mismatch between `ipywidgets` (Python package) and `jupyterlab-widgets` (frontend extension) preventing the widget from rendering.","error":"Error displaying widget"},{"fix":"Install the `ipywidgets` Python package in the active environment: `pip install ipywidgets` or `conda install -c conda-forge ipywidgets`. Ensure the Jupyter kernel you are using is running in this environment.","cause":"The `ipywidgets` Python package, which provides the backend logic for interactive widgets, is not installed or not accessible in the Python environment associated with your Jupyter kernel.","error":"ModuleNotFoundError: No module named 'ipywidgets'"},{"fix":"Update both `ipywidgets` and `jupyterlab_widgets` to compatible versions. For JupyterLab 3 and 4, `jupyterlab_widgets` 3.x is generally compatible with `ipywidgets` 7.x and 8.x. Try `pip install --upgrade ipywidgets jupyterlab_widgets` or `conda update ipywidgets jupyterlab_widgets`. A complete rebuild of JupyterLab assets might also be necessary via `jupyter lab build` after updating.","cause":"The JupyterLab frontend cannot locate or load the JavaScript model for a specific widget, often due to a mismatch between the `ipywidgets` Python version and the `jupyterlab-widgets` frontend extension version, or a corrupted JupyterLab build.","error":"Error: widget model not found"},{"fix":"Update `jupyterlab` and `jupyterlab_widgets` to their latest compatible versions. If the problem persists, try uninstalling and reinstalling potentially conflicting extensions or performing a clean JupyterLab rebuild. Ensure `ipywidgets` and `jupyterlab_widgets` are installed from the same channel (e.g., all from `conda-forge`).","cause":"The installed `jupyterlab-widgets` extension, or one of its dependencies, is not compatible with your current JupyterLab version, or there are conflicting extensions. This message appears when running `jupyter labextension list`.","error":"The following extensions may be outdated or specify dependencies that are incompatible with the current version of jupyterlab: @jupyter-widgets/jupyterlab-manager"},{"fix":"Enable long path support in Windows (requires administrator privileges and a system restart, via Group Policy Editor or Registry Editor). Alternatively, try using a virtual environment manager that handles shorter paths, or for `ipywidgets` 8.x, consider pinning to an older version like `ipywidgets==7.7.0` which installed a smaller `jupyterlab-widgets` v1.1.11 that might not hit the path limit.","cause":"This error typically occurs on Windows systems during the installation of `ipywidgets` (which bundles `jupyterlab-widgets` assets) due to the default Windows path length limit (260 characters), as the bundled JavaScript files can create very long nested paths.","error":"FileNotFoundError: [Errno 2] No such file or directory: '...jupyterlab-manager\\static\\vendors-node_modules_d3-color_src_color_js-node_modules_d3-format_src_defaultLocale_js-node_m-09b215.2643c43f22ad111f4f82.js'"}],"ecosystem":"pypi","meta_description":null,"install_score":100,"install_tag":"verified","quickstart_score":0,"quickstart_tag":"stale","pypi_latest":"3.0.16","install_checks":{"last_tested":"2026-05-12","tag":"verified","tag_description":"installs cleanly on critical runtimes, fast import, recently tested","results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":1.44,"mem_mb":28,"disk_size":"79.3M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"17.8M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":1.42,"mem_mb":27.9,"disk_size":"56.2M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":5.1,"import_time_s":1.15,"mem_mb":28,"disk_size":"80M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":1.6,"import_time_s":null,"mem_mb":null,"disk_size":"18M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":1.03,"mem_mb":27.9,"disk_size":"57M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":2.11,"mem_mb":32.3,"disk_size":"83.7M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"19.7M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":2.16,"mem_mb":32.1,"disk_size":"59.7M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":5.3,"import_time_s":1.92,"mem_mb":32.3,"disk_size":"84M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":1.6,"import_time_s":null,"mem_mb":null,"disk_size":"20M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":1.66,"mem_mb":32.1,"disk_size":"60M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":2.11,"mem_mb":31.5,"disk_size":"74.5M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"11.5M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":2.04,"mem_mb":31.3,"disk_size":"50.5M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":5,"import_time_s":2.13,"mem_mb":31.5,"disk_size":"75M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":1.5,"import_time_s":null,"mem_mb":null,"disk_size":"12M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":1.98,"mem_mb":31.3,"disk_size":"51M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":2.06,"mem_mb":33,"disk_size":"74.3M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"11.3M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":1.99,"mem_mb":32.8,"disk_size":"50.1M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":4.9,"import_time_s":2.03,"mem_mb":33,"disk_size":"75M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":1.5,"import_time_s":null,"mem_mb":null,"disk_size":"12M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":1.97,"mem_mb":32.8,"disk_size":"51M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":1.46,"mem_mb":28.3,"disk_size":"55.5M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"17.3M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":1.34,"mem_mb":28.2,"disk_size":"55.4M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":5,"import_time_s":1.27,"mem_mb":28.3,"disk_size":"56M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":" $EXIT -eq 0 ","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":1.8,"import_time_s":null,"mem_mb":null,"disk_size":"18M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":1.21,"mem_mb":28.2,"disk_size":"56M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null}]},"quickstart_checks":{"last_tested":"2026-04-24","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]}}