QGIS Plugin#

CartAGen is also available as a QGIS processing plugin logosub. This adds a new toolbox containing the different algorithms of the Python library. The version of the plugin is tied to a specific version of CartAGen which is shipped inside the plugin.

Installation#

The plugin is currently available in the official QGIS plugin repository. Currently, when loading the plugin, a dialog allows you to automatically install CartAGen Python lib within the current Python environment. This is the prefered way. But it can fail you and you may want to tweak the dependencies version to your liking. If you are using Linux, we recommend using the Flatpak version as its Python environment is isolated from the global Python environment.

Linux#

Debian/Ubuntu#

Depending on your linux distribution, the installation of CartAGen system-wide can be different. Please keep in mind that installing system-wide pip packages using this solution will conflict with the apt packages of your system. Continue at your own risks.

One way to install the CartAGen Python package for QGIS is to use this command outside of a python environment:

$ pip install cartagen

If you are running Debian 12 or above, you might get an error from the system because you are trying to install the package outside of a virtual environment. You can bypass this error by using the --break-system-package flag:

$ pip install --break-system-package cartagen

Windows#

To install a Python package for QGIS in Windows (from this blog post):

  1. Open OSGeo4W shell, it should be available in your start menu

  2. Type py3_env in the console (This should print paths of your QGIS Python installation)

  3. Use pip to install CartAGen:

    python -m pip install cartagen