0

I work with QGIS 3.32.2-Lima on Ubuntu.

I would like to install and use this useful plugin :

https://plugins.qgis.org/plugins/spectral_libraries/

But it seems to be deprecated?

So when I try to install it with QGIS, I get an error message below: If this plugin does not work anymore, what would be any alternative with QGIS?

Impossible de charger l'extension 'spectral_libraries' provoque une erreur lors de l'appel à sa méthode classFactory() ModuleNotFoundError: No module named 'mock' Traceback (most recent call last): File "/usr/lib/python3/dist-packages/qgis/utils.py", line 423, in _startPlugin plugins[packageName] = package.classFactory(iface) File "/home/geoteca/.local/share/QGIS/QGIS3/profiles/default/python/plugins/spectral_libraries/__init__.py", line 14, in classFactory from spectral_libraries.spectral_libraries_plugin import SpectralLibrariesPlugin File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/home/geoteca/.local/share/QGIS/QGIS3/profiles/default/python/plugins/spectral_libraries/spectral_libraries_plugin.py", line 29, in from spectral_libraries.interfaces.spectral_library_gui import SpectralLibraryWidget File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/home/geoteca/.local/share/QGIS/QGIS3/profiles/default/python/plugins/spectral_libraries/interfaces/spectral_library_gui.py", line 34, in initResources() File "/home/geoteca/.local/share/QGIS/QGIS3/profiles/default/python/plugins/spectral_libraries/qps/__init__.py", line 154, in initResources from .testing import initResourceFile File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/home/geoteca/.local/share/QGIS/QGIS3/profiles/default/python/plugins/spectral_libraries/qps/testing.py", line 40, in import mock File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'mock' 

1 Answer 1

0

A quick search of PyPI shows that the mock library is available for installation. Try installing mock with pip, try again, and report back. QGIS on Linux uses the regular Python interpreter so the library installation is no different than any Python library installation.

Your question asks for alternatives for QGIS. The QGIS/Orfeo toolbox processing toolset should have all the tools you need. You do not specify what tools you need exactly but here is a link to the Orfeo Cookbook.

2
  • Thanks for your message. But OTB does not really match to my request for the error message resolution (miss python mock module). As far as i understood, my error message deals with a missing qgis python mock module. /usr/lib/python3/dist-packages/qgis Do you know how to install this module specifically for the python qgis ? Commented Nov 2, 2023 at 11:14
  • 1. Open OSGeo4WShell. It is installed with QGIS. 2. Install the missing Moduls with pip. 3. Restart QGIS Commented Nov 3, 2023 at 8:52

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.