The Jupyter contributor community is proud to announce JupyterLab 4.0, the next major release of our full-featured development environment. The package is now available on PyPI and conda-forge. You can upgrade by running pip install --upgrade jupyterlab or conda install -c conda-forge jupyterlab. We have updated our JupyterLab Documentation for this new version.

A screen shot of JupyterLab 4, showing many of its new and improved features.

Here are some of the major new features in JupyterLab 4.0, excerpted from our changelog:

JupyterLab is now faster, thanks to improvements such as CSS rules optimization, CodeMirror 6, MathJax 3, and notebook windowing. By rendering only the parts of a notebook that fit in the web browser viewport, JupyterLab 4 is much more efficient than JupyterLab 3 was when working with large notebooks.

A side-by-side animated comparison of performance between JupyterLab 3 and 4.

There are additional performance improvements available via opt-in settings. You can help test them out by enabling them in your settings:

  • Faster tab-switching on Chromium browsers:

    “Settings” → “JupyterLab Shell” → switch “Hidden mode” to “contentVisibility”
  • Better performance with long notebooks:

    “Settings” → “Notebook” → switch “Windowing mode” to “full”

An upgraded text editor. CodeMirror, the text editor used for cells and file editors, has been updated to CodeMirror 6. This brings important accessibility and performance improvements as well as better customization capabilities. We have also improved the editor settings to be more powerful and more flexible.

We have moved real-time collaboration (RTC) into a separate package, jupyter_collaboration, version 1.0.0 of which is now available. Highlights include support for displaying multiple cursors and selections, and support for registration of new shared model types. If you’d like to use RTC in JupyterLab 4, please install the jupyter_collaboration package.

A side-by-side animated view of two users collaborating in JupyterLab 4 using the jupyter_collaboration package for real-time collaboration (RTC)

A new extension manager. In JupyterLab 4, the Extension Manager includes both prebuilt Python extensions and extensions from Installing from PyPI removes the need to build when installing an extension using the Extension Manager. Developers can provide an alternative package repository to display their own set of extensions.

Improved document search. The Search and Replace functionality has been improved with new features when searching in a notebook, including highlighting matches in rendered markdown cells, searching in the current selection, multi-line search, replacement using regular expression capture-group references, and replacement while preserving case.

UI improvements, including a reworked running kernels section, an “Add a new cell” button at the bottom of a notebook, a dialog to display keyboard shortcuts as in the Classic Notebook (use Ctrl + Shift + H), and displaying the first line of collapsed cell inputs and outputs.

Accessibility improvements, including improved focus and keyboard navigation in the file browser, more ARIA roles and labels for UI elements, and the main menu collapsing to a hamburger menu if there is not enough space to display all items.

Development tool updates to TypeScript v5, Yarn v3, React v18, and Lumino v2. We recommend using Node.js v18 or newer, to ensure that you’re using a version that will continue to receive updates through at least the end of 2023.

Bug fixes. More than 100 bugs have been addressed and resolved, enhancing JupyterLab’s stability and performance. You can find a full list of bug fixes on GitHub.

In addition, a few features in JupyterLab 4 have also been backported to JupyterLab 3.6, but if you’re upgrading from 3.5 or earlier, they will also be new to you:

The dual-mode settings editor now offers a JSON editor and a new, user-friendly interactive mode, built with React JSON Schema. This intuitive interface makes customization accessible to users of all skill levels.

The cell toolbar, a graphical interface for quick cell manipulation (copy, move, insert, delete), provides an alternative to hotkeys or dropdown menu editing. The cell toolbar appears in the current cell as long as there is room for it.

Notifications come from extensions and from JupyterLab itself, for real-time announcements, alerts, and updates. This enhances JupyterLab’s responsiveness and provides a way to stay informed about ongoing processes. Announcements from the JupyterLab team, including new version notifications, can be disabled; see the documentation for instructions.

Thank you to all the users, contributors, extension developers, and community members who helped make this major new release possible. We encourage everyone to try this new version out. If you notice anything unexpected, please file an issue on GitHub or ask us about it on Discourse.

Author’s note: This article is published on behalf of Project Jupyter. I appreciate the contributions of the JupyterLab developers who contributed to it.

Read More