Skip to content

UMEP fails to load on Linux Mint 22.3 / Python 3.12 — ModuleNotFoundError: No module named 'imp' #839

Description

@nikosGeography

System Information

  • OS: Linux Mint 22.3 Zena (Ubuntu 24.04 Noble base)
  • QGIS version: 3.44.9-Solothurn (installed from official qgis.org LTR repository)
  • Python version: 3.12.3
  • GDAL: 3.8.4
  • GEOS: 3.12.1

UMEP fails to load after installation via the QGIS Plugin Manager, with the following error:


Couldn't load plugin 'UMEP' due to an error when calling its classFactory() method
ModuleNotFoundError: No module named 'future'

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 478, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/home/thedoctor/.local/share/QGIS/QGIS3/profiles/default/python/plugins/UMEP/__init__.py", line 42, in classFactory
    from .UMEP import UMEP
  File "/home/thedoctor/.local/share/QGIS/QGIS3/profiles/default/python/plugins/UMEP/UMEP.py", line 41, in <module>
    from .LCZ_Converter.LCZ_converter import LCZ_converter
  File "/home/thedoctor/.local/share/QGIS/QGIS3/profiles/default/python/plugins/UMEP/LCZ_Converter/LCZ_converter.py", line 24, in <module>
    from future import standard_library
ModuleNotFoundError: No module named 'future'


When I install python3-future via apt (sudo apt install python3-future), the module is found but a new error appears:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/future/standard_library/__init__.py", line 65, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

The imp module was removed in Python 3.12, and the version of python3-future available in the Ubuntu 24.04 apt repository is too old to support Python 3.12.

What I have tried

  • Installed core dependencies via apt: sudo apt install python3-scipy python3-numpy python3-pandas python3-matplotlib python3-requests — these install and import successfully
  • Installed python3-future via apt — installs but fails with No module named 'imp' as described above
  • pip install is restricted by PEP 668 on Ubuntu 24.04 and cannot be used directly

Expected behaviour

UMEP should load successfully after installation.

Question

Is there a supported way to install UMEP on Python 3.12 / Ubuntu 24.04 based systems, where the imp module no longer exists? Has this been fixed in a development version, and if so, is there a recommended installation path for Linux Mint 22.3 users?

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions