Installation

Requirements

The plugin’s logic is mainly based on on the DuckDB API’s Pyton client, which is not distributed with QGIS.

⚠️ Version information

Between QGIS versions 3.34.5 and 3.34.6, the packaging for the Windows version of QGIS changed from Python 3.9 to Python 3.12.

To keep pace with this evolution, we had to upgrade the plugin package as well.

As a result :

  • For QGIS versions 3.34.5 and below, the plugin is frozen in version 0.6.3

  • To get the latest version, you need at least qgis 3.34.6, this starts with version 0.7.0 of the plugin

Linux

Typically on Ubuntu 22.04 with Python 3.10

Open a terminal and install dependencies from the Python Package Index (PyPi):

python3 -m pip install "duckdb==1.3.0"

Windows: embedded package

It’s quite a challenge to install it on QGIS for Windows, because QGIS uses its own Python interpreter and doesn’t make it easy to use packages manager (pip).

To make it easier for Windows end-users, we did our best to embed the dependencies within the released version of the plugin (during CI), inside the embedded_external_libs folder.

Technically, the plugin tries to:

  1. import packages from the Python interpreter used by QGIS (system on Linux, specific on Windows)

  2. if it does not succeed, then it adds the embedded_external_libs subfolder to the PYTHONPATH and then import packages from it

  3. it it still fails, then the plugin is disabled and the user is warned with a button leading him to here:

Dependencies missing

BUT there are some caveats because those packages require to be compiled with the same exact Python version than the one used by QGIS and sometimes the QGIS packagers change the Python version…

MacOS

Note that on MacOS QGIS uses its own python, not the system’s.

Open a terminal and install dependencies from the Python Package Index (PyPi) on QGIS python :

/Applications/QGIS.app/Contents/MacOS/bin/python3.9 -m pip install "duckdb==1.3.0"

Manual installation

Then, if the plugin fails to import a package, you can try to install it manually using the pip command.

Mainly tested on Windows 10.0.19044.

  1. Launch the OSGeo4W Shell. Look for it in your Windows Search or directly into your QGIS install folder:

    • installed with the all inclusive standalone .msi: C:\Program Files\QGIS

    • installed with the OSGeo4W with default settings: C:\OSGeo4W

  2. Run (example with QGIS LTR installed):

python-qgis-ltr -m pip install -U pip
python-qgis-ltr -m pip install -U setuptools wheel
python-qgis-ltr -m pip install -U "duckdb==1.3.0"

Important

Remember to look at the requirements/embedded.txt file to make sure you are not missing any package and using the correct versions. The above command is just an example, a pattern.


Plugin

Beta versions released

Enable experimental extensions in the QGIS plugins manager settings panel.

Earlier development version

If you define yourself as early adopter or a tester and can’t wait for the release, the plugin is automatically packaged for each commit to main, so you can use this address as repository URL in your QGIS extensions manager settings:

https://oslandia.gitlab.io/qgis/qduckdb/plugins.xml

Be careful, this version can be unstable.