Registry / web-framework / ipykernel

ipykernel

JSON →
library7.2.0pypypi✓ verified 35d ago

ipykernel provides the IPython kernel, which serves as the Python execution backend for Jupyter Notebooks, JupyterLab, and other Jupyter frontends. It facilitates interactive Python development, supports rich media outputs, and enables seamless code sharing within these environments. The current stable version is 7.2.0, and the project maintains an active development and release cadence.

web-frameworkai-mldata
Install & Compatibility
Where this runs
tested against v7.2.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.925 runs
installs and imports cleanly · install 0.0s · import 2.243s · 96.9MB
glibc
py 3.103.925 runs
installs and imports cleanly · install 7.1s · import 2.048s · 81MB
93MB installed
● package 93MB
Code
Verified usage

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

Used for embedding an IPython kernel into a Python application, not typically for general Jupyter usage.

from ipykernel.embed import embed_kernel

The primary use case for ipykernel is to provide a Python execution environment for Jupyter frontends. This quickstart demonstrates how to install ipykernel and register it as a new kernel in your current Python environment, making it available in Jupyter Notebook or JupyterLab. It's best practice to perform this within an activated virtual environment.

import subprocess import sys import os # Ensure ipykernel is installed in the current environment subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'ipykernel']) # Define a unique name for your kernel (e.g., based on virtual environment name) env_name = os.environ.get('VIRTUAL_ENV', 'default_env').split(os.sep)[-1] display_name = f"Python ({env_name.replace('_', ' ').title()} Environment)" # Register the kernel with Jupyter try: subprocess.check_call([ sys.executable, '-m', 'ipykernel', 'install', '--user', f'--name={env_name}', f'--display-name={display_name}' ]) print(f'Successfully registered Jupyter kernel: "{display_name}" (name: {env_name})') print('To use it, launch Jupyter Notebook/Lab and select this kernel for a new notebook.') print('You can verify installed kernels with: jupyter kernelspec list') except subprocess.CalledProcessError as e: print(f'Failed to register kernel: {e}') print('Ensure Jupyter is installed (pip install notebook or pip install jupyterlab).')
Debug
Known footguns
breakingipykernel 7.0.0 introduced significant architectural changes for kernel subshells, including handling shell channel messages in a separate thread. While intended to be backward compatible for non-subshell users, these changes may break assumptions made by downstream libraries. Users encountering issues should consider pinning to `ipykernel < 7`.
breakingSupport for Python 3.9 was dropped in `ipykernel 7.0.0a3`. Users on Python 3.9 or older must use `ipykernel` version 6.x or earlier.
gotchaVersion 6.30.0 contained a bug that allowed control messages to be handled concurrently, which severely broke debugging in JupyterLab and VSCode. This was a critical regression fixed in version 6.30.1.
gotchaPrior to 7.1.0 (and 6.31.0 for the 6.x series), display outputs from magics like `%notebook` were not always included when saving sessions to `.ipynb` files, as `ZMQDisplayPublisher.store_display_history` defaulted to `False`.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
16 hits · last 30 days
claudebot
5
amazonbot
4
dotbot
3
ahrefsbot
3
bytedance
1
Resources