Registry / web-framework / aqt
library26.8.1pypypi✓ verified 23d ago

The `aqt` package on PyPI, currently at version 25.9.2, serves as the internal Python module for the Anki flashcard application's graphical user interface. It is built upon the Qt toolkit, primarily through PyQt bindings, and is designed for the development of Anki add-ons and extensions. This package's release cadence is tied directly to the development and release cycle of the Anki application itself, which typically sees frequent updates.

pip install aqt
INSTALL
IMPORT
SIG · AQT
A
aqt
web-frameworkpythonv26.8.1
Install
11.9s avg
Import
Disk
608MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v26.8.1 · 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.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 11.9s · import 0.000s · 609MB
608MB installed
● package 608MB
Code
Verified usage

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

mw
from aqt import mw
Main window object in Anki add-ons
editor
from aqt import editor
Access to Anki's editor interface
browser
from aqt import browser
Access to Anki's browser interface

This quickstart demonstrates how to interact with Anki's main window and show a simple info dialog using the `aqt` module, as typically done within an Anki add-on. This code is intended to be run within the Anki application environment, where `aqt.mw` and `aqt.qt` (PyQt bindings) are already initialized.

import aqt from aqt.utils import showInfo def my_anki_addon_action(): showInfo("Hello from my Anki add-on using aqt!") # Example: Add a menu item to Anki's Tools menu # This code is typically placed in an Anki add-on's __init__.py # This requires Anki's main window (mw) to be available. # In a real add-on, 'aqt.mw' is automatically populated. # For a standalone runnable example, it would need a mock Anki environment. # To simulate, if running directly, this part would not execute outside Anki # if aqt.mw is None: # print("Run this code within Anki for full functionality.") # else: # action = aqt.qt.QAction("My Custom Action", aqt.mw) # action.triggered.connect(my_anki_addon_action) # aqt.mw.form.menuTools.addAction(action)
Debug
Known issues
gotchaThis `aqt` package (version 25.9.2) is often confused with `aqtinstall`, a completely separate command-line utility for installing Qt binaries. They serve different purposes and are not interchangeable.
fix
Ensure you are installing `aqtinstall` if you need the Qt installer, or `aqt` if you are developing Anki add-ons and understand its context.
affects: All versions
gotchaThe `aqt` package is primarily an internal module of the Anki application. Its API is not designed for standalone general-purpose GUI development and is subject to change with Anki updates without explicit deprecation cycles for external users.
fix
Use `PyQt` or `PySide` directly for general Qt-based GUI development. Only use `aqt` if you are specifically developing an Anki add-on.
affects: All versions
gotchaInstalling `aqt` via pip does not provide a complete GUI framework for standalone applications. It relies on Anki's bundled Qt/PyQt environment. Attempting to use it outside an active Anki instance will likely result in missing dependencies or uninitialized components.
fix
If developing an Anki add-on, run your code within Anki. For standalone GUI development, explicitly install and use a full Qt binding like `PyQt6` or `PySide6`.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'aqt'
This error occurs when the 'aqt' module is not installed or not found in the Python environment.
fix
Ensure that Anki is installed correctly and that the 'aqt' module is available in your Python environment. If using a virtual environment, activate it before running Anki.
ModuleNotFoundError: No module named '_aqt'
This error arises when the '_aqt' module, a private module within 'aqt', is missing or not properly installed.
fix
Reinstall Anki to ensure all necessary modules, including '_aqt', are correctly installed.
ImportError: No module named QtWebKit
This error occurs when the 'QtWebKit' module, required by Anki's 'aqt' package, is missing.
fix
Install the 'python-qt4' package, which includes 'QtWebKit', to resolve this dependency issue.
ModuleNotFoundError: No module named 'PyQt5.sip'
This error indicates that the 'PyQt5.sip' module is missing, which is required by Anki's 'aqt' package.
fix
Ensure that the 'PyQt5' package is installed correctly, as it includes the 'sip' module.
ImportError: cannot import name 'ImportLogWithChanges' from 'anki.collection'
This error occurs when the 'ImportLogWithChanges' component is missing or not found in the 'anki.collection' module.
fix
Update Anki to the latest version to ensure all components are present and correctly installed.
Upgrade
Version history
26.8.1latest on PyPI · released Aug 5, 2026
Audit
Dependencies
PyQt5/PyQt6requiredAnki's UI is built on Qt, requiring PyQt bindings at runtime. These are typically bundled with Anki.
Agent activity
29 hits · last 30 days
node
24
OpenAI (training)
1
Resources
aqt — pip install aqt · libregistry