Skip to content

ModuleNotFoundError: No module named 'shapely'  #2

Description

@Ludwig-K

Fresh install on QGis 3.40.1

Plugin-load raises error:

Couldn't load plugin 'm150xml' due to an error when calling its classFactory() method 

ModuleNotFoundError: No module named 'shapely' 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 426, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ludwig/.local/share/QGIS/QGIS3/profiles/default/python/plugins/m150xml/__init__.py", line 36, in classFactory
    from .m150xml import m150xml
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 966, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ludwig/.local/share/QGIS/QGIS3/profiles/default/python/plugins/m150xml/m150xml.py", line 43, in 
    from shapely.geometry import MultiPolygon,MultiLineString
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 966, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'shapely'


Python version: 3.12.3 (main, Nov  6 2024, 18:32:19) [GCC 13.2.0] 
QGIS version: 3.40.1-Bratislava Bratislava, 989853a7a31 

Python Path:
/usr/share/qgis/python
/home/ludwig/.local/share/QGIS/QGIS3/profiles/default/python
/home/ludwig/.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/local/lib/python3.12/dist-packages
/usr/lib/python3/dist-packages
/home/ludwig/.local/share/QGIS/QGIS3/profiles/default/python

Note:
obviously the shapely-library is not part of QGis-Installations
Error can be resolved by
pip install shapely --break-system-packages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions