Skip to content

Install the QGIS SDK

The Python developer kit qgis-sdk installs two packages at matching versions: qgis-sdk-runtime, what a plugin imports inside QGIS, and qgis-sdk-tools, the qgis-sdk command. Neither installs anything into a QGIS: a built plugin vendors its own copy of the runtime.

The tools run on any Python 3.11+ - a virtual environment, Pixi, the system interpreter. qgis-sdk test --target qgis, qgis-sdk dev and qgis-sdk build find a QGIS through QGIS_PREFIX_PATH, qgis on PATH, the current environment, or [tool.qgis-sdk] qgis-prefix in the project.

With pip, into any environment:

Terminal window
pip install qgis-sdk

With Pixi, from the prefix.dev channel:

Terminal window
pixi add --channel https://prefix.dev/archont561/archont561 qgis-sdk

The runtime alone, for the QGIS Python console, a host script or a copy to vendor:

Terminal window
pip install qgis-sdk-runtime

Only a plugin with a web page needs it; qgis-sdk new --web writes the dependency for you.

Terminal window
bun add @archont561/qgis-sdk # or its unscoped alias: bun add qgis-sdk
bun add @archont561/qgis-sdk-ui # the web components, optional
Terminal window
npm install @archont561/qgis-sdk # or: npm install qgis-sdk
npm install @archont561/qgis-sdk-ui # the web components, optional
Terminal window
qgis-sdk --help
qgis-sdk targets # the support matrix, and where this host stands in it

targets prints the QGIS and Python versions the kit is qualified against and which of them this machine can reach, so you know up front whether the native test layers and dev will run here or only the QGIS-free ones.