Install & Compatibility
Where this runs
tested against v5.7.2 · 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 0.000s · 129.5MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 7.5s · import 0.000s · 113MB
115MB installed
● package 115MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
RichJupyterWidget
✓ from qtconsole.rich_jupyter_widget import RichJupyterWidget
✗ from qtconsole.rich_jupyter_widget import RichJupyterWidget
JupyterWidget
✓ from qtconsole.rich_jupyter_widget import JupyterWidget
version_info
✓ from qtconsole import version_info
The simplest way to start the Qt console is by running `jupyter qtconsole` from your terminal. For embedding it into a custom Qt application, you can use `RichJupyterWidget` to host a Jupyter kernel in-process. This example demonstrates launching an in-process kernel and executing commands.
import sys
from qtconsole.rich_jupyter_widget import RichJupyterWidget
from qtconsole.inprocess import QtInProcessKernelManager
from PyQt5.QtWidgets import QApplication
def main():
app = QApplication([])
# Create a kernel manager and start a kernel
kernel_manager = QtInProcessKernelManager()
kernel_manager.start_kernel(show_banner=False)
kernel_client = kernel_manager.client()
kernel_client.start_channels()
# Create the Qt console widget
console = RichJupyterWidget()
console.kernel_manager = kernel_manager
console.kernel_client = kernel_client
# Execute some code programmatically
console.execute('print("Hello from embedded QtConsole!")')
console.execute('import matplotlib.pyplot as plt')
console.execute('plt.plot([1,2,3], [4,5,6])')
console.execute('plt.show()')
console.show()
sys.exit(app.exec_())
if __name__ == '__main__':
# To run this example, ensure you have:
# pip install qtconsole ipykernel PyQt5
main()
qtconsole --version
Debug
Known issues
gotchaWhen installing via `pip`, Qt bindings (e.g., PyQt5, PySide2) are *not* automatically installed. These must be installed separately. Using `conda install qtconsole` typically handles this dependency automatically.fixAfter `pip install qtconsole`, also run `pip install PyQt5` (or PySide2/6/PyQt6) or use `conda install qtconsole`.
affects: All versions
breakingIn version 4.3, the `ConsoleWidget.width` and `ConsoleWidget.height` traits were renamed to `console_width` and `console_height` respectively to avoid clashes with `QWidget` properties.fixUpdate any code referencing `ConsoleWidget.width` or `ConsoleWidget.height` to use `console_width` or `console_height`.
affects: >=4.3
gotchaWhen embedding `qtconsole` in a custom Qt application, user code executed in the kernel runs in a separate process from the frontend. This means you cannot directly access the `QtApplication` instance of the `QtConsole` itself from within the kernel's executed code.fixDesign your embedded application to handle the separation of processes for kernel execution and frontend GUI. Avoid attempting direct cross-process Qt object manipulation.
affects: All versions
gotchaUsers have reported issues with the `qtconsole` freezing and throwing `QTextCursor::setPosition: out of range` errors after calling `input()`, and crashes when using the 'auto' backend with Matplotlib.fixCheck for official patches or workarounds on the `qtconsole` GitHub issues page. For `input()` issues, consider alternative input methods if possible within your application context. For Matplotlib, explicitly set a non-'auto' backend.
affects: Recent versions (e.g., 5.x)
gotchaThere are reports of `Segfault on import` when running `qtconsole` against Qt 6.7 on 64-bit Windows 11 with Python 3.12, indicating potential compatibility issues with newer Qt or Python versions.fixIf encountering segfaults, consider using a slightly older, known-compatible combination of Python, Qt, and `qtconsole` versions, or monitor the GitHub repository for official fixes.
affects: 5.x with Qt 6.7 / Python 3.12
Upgrade
Version history
5.7.2latest on PyPI · released Mar 25, 2026
Audit
Dependencies
pythonrequiredRuntime environment
ipykernelrequiredRequired to connect to a Jupyter kernel, especially for embedded use or rich features.
jupyter_clientrequiredInterface to Jupyter protocol, managing kernels.
pygmentsrequiredSyntax highlighting.
qtpyrequiredQt binding abstraction layer used internally.
PyQt6optionalPython bindings for Qt GUI toolkit. One of PyQt6, PySide6, PyQt5, or PySide2 is required.
PySide6optionalPython bindings for Qt GUI toolkit. One of PyQt6, PySide6, PyQt5, or PySide2 is required.
PyQt5optionalPython bindings for Qt GUI toolkit. One of PyQt6, PySide6, PyQt5, or PySide2 is required.
PySide2optionalPython bindings for Qt GUI toolkit. One of PyQt6, PySide6, PyQt5, or PySide2 is required.