Problems Python, Qgis, Gdal

I’m failing to use some Qgis or Gdal features that call Python, having errors I’m not able to handle, since I don’t know how to use Python, and I’m just starting to figure out. For instance I’ve in the past on other Linux distros, been dealing with several pyhton installs, 2.7 and 3 and I’m not used to declaring a “path”. this is the errors i get using some extensions that cant’t be loaded or commands on bash (gdal) that doesnt work. thanks for helping me

Grass : 2024-05-21T10:00:23 CRITICAL Problem with GRASS installation: GRASS was not found or is not correctly installed

icetool (very important to me now):

Impossible de charger l’extension ‘ICEtool’ provoque une erreur lors de l’appel à sa méthode classFactory()

ModuleNotFoundError: No module named ‘pandas’
Traceback (most recent call last):
File “/usr/lib/python3.12/site-packages/qgis/utils.py”, line 426, in _startPlugin
plugins[packageName] = package.classFactory(iface)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ICEtool/init.py”, line 36, in classFactory
from .ICEtool import ICEtoolPlugin
File “/usr/lib/python3.12/site-packages/qgis/utils.py”, line 923, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ICEtool/ICEtool.py”, line 37, in
from .ICEtool_provider import ICEtoolProvider
File “/usr/lib/python3.12/site-packages/qgis/utils.py”, line 923, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ICEtool/ICEtool_provider.py”, line 44, in
from .Scripts.Step4_ComputeTemperatureCSV import ComputeGroundTemperatureCSV
File “/usr/lib/python3.12/site-packages/qgis/utils.py”, line 923, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ICEtool/Scripts/Step4_ComputeTemperatureCSV.py”, line 32, in
import pandas as pd
File “/usr/lib/python3.12/site-packages/qgis/utils.py”, line 923, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named ‘pandas’

Version de Python : 3.12.3 (main, Apr 23 2024, 09:16:07) [GCC 13.2.1 20240417]
Version de QGIS : 3.36.2-Maidenhead Maidenhead, exported

Chemin Python :
/usr/share/qgis/python
/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python
/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python312.zip
/usr/lib/python3.12
/usr/lib/python3.12/lib-dynload
/usr/lib/python3.12/site-packages
/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python
/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/vrtbuilderplugin/vrtbuilder

Vrtbuilder on qgis

Impossible de charger l’extension ‘vrtbuilderplugin’ provoque une erreur lors de l’appel à sa méthode initGui() (unable to load vrtbuilder plugin)

AttributeError: type object ‘QgsMapLayerProxyModel’ has no attribute ‘Filters’. Did you mean: ‘filters’?
Traceback (most recent call last):
File “/usr/lib/python3.12/site-packages/qgis/utils.py”, line 451, in startPlugin
plugins[packageName].initGui()
File “/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/vrtbuilderplugin/vrtbuilder/vrtbuilderplugin.py”, line 48, in initGui
from vrtbuilder.widgets import VRTBuilderWidget
File “/usr/lib/python3.12/site-packages/qgis/utils.py”, line 923, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/vrtbuilderplugin/vrtbuilder/widgets.py”, line 28, in
from .externals.qps.maptools import SpatialExtentMapTool
File “/usr/lib/python3.12/site-packages/qgis/utils.py”, line 923, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/vrtbuilderplugin/vrtbuilder/externals/qps/maptools.py”, line 54, in
from .utils import *
File “/usr/lib/python3.12/site-packages/qgis/utils.py”, line 923, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/vrtbuilderplugin/vrtbuilder/externals/qps/utils.py”, line 2420, in
class SelectMapLayersDialog(QgsDialog):
File “/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/vrtbuilderplugin/vrtbuilder/externals/qps/utils.py”, line 2421, in SelectMapLayersDialog
class LayerDescription(object):
File “/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/vrtbuilderplugin/vrtbuilder/externals/qps/utils.py”, line 2423, in LayerDescription
def init(self, info: str, filters: QgsMapLayerProxyModel.Filters, allowEmptyLayer=False):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object ‘QgsMapLayerProxyModel’ has no attribute ‘Filters’. Did you mean: ‘filters’?

Version de Python : 3.12.3 (main, Apr 23 2024, 09:16:07) [GCC 13.2.1 20240417]
Version de QGIS : 3.36.2-Maidenhead Maidenhead, exported

Chemin Python : [python path]
/usr/share/qgis/python
/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python
/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python312.zip
/usr/lib/python3.12
/usr/lib/python3.12/lib-dynload
/usr/lib/python3.12/site-packages
/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python
/home/vincent/.local/share/QGIS/QGIS3/profiles/default/python/plugins/vrtbuilderplugin/vrtbuilder

According to GRASS 7 (7.6.1) is not been "detected" properly by QGIS-LTR (3.4.7-1) on [Arch Linux] · Issue #30049 · qgis/QGIS · GitHub
(which I found by searching for “archlinux qgis”)

@fvguilherme AFAIK there are 3 packages providing QGIS on Arch:

    qgis which is an official package and which does not get compiled with GRASS support (source).
    qgis-ltr which is an AUR package and which does not get compiled with GRASS support (source).
    qgis-git which is an AUR package and which get compiled with GRASS support (source).

So, if you want to use GRASS from within QGIS you have two options:

    install GRASS from AUR and then install qgis-git
    Compile from source.

To install an aur package, you can either do it manually by following these instructions: Arch User Repository - ArchWiki

Or you can use an aur helper, which is far simpler than doing it manually and will help keep qgis up to date, but if something goes wrong, it may be harder to fix.

https://wiki.archlinux.org/title/AUR_helpers#Comparison_tables

I personally use paru, which can be installed by running this command.

sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si

but I believe “yay” is more popular.

once you have an aur helper installed, install
https://aur.archlinux.org/packages/qgis-git
and
https://aur.archlinux.org/packages/grass

As for python, there’s a few options for dealing with multiple python environments.
https://wiki.archlinux.org/title/Python/Virtual_environment

once you have one setup, you will need to use pip to install the required dependencies

for example,

ModuleNotFoundError: No module named ‘pandas’

this means you need to run “pip install pandas” in the same environment you’re running qgis in.

I’m unsure why vrtbuilder isn’t working, someone more experienced than me will need to help.

good luck.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.