Skip to content

Issue setting up python environment for standalone use on a Linux machine #119

@bweeding

Description

@bweeding

Hi Fredrik and team, has been a while!

I'm getting back into some SOLWEIG involved work, and I'm having trouble setting up an environment that works...

If I set up a python 3.12 based env (which I believe is what is needed for the latest UMEP processing?), then I run into issues with the gsl package (see the error below). However, if I constrain my setup with gsl==2.6 (which eliminates the error below), then I run into all sorts of other problems trying to get python and qgis and gdal to play nice.

Any thoughts?

Cheers from Tasmania
Ben

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[2], line 11
      9 import time
     10 import datetime
---> 11 import processing
     12 from qgis import processing
     13 import qgis.core

File /opt/anaconda3/envs/solweig_bw0/share/qgis/python/plugins/processing/__init__.py:24
     22 from processing.tools.dataobjects import *  # NOQA
     23 from processing.tools.dataobjects import createContext
---> 24 from processing.tools.general import *  # NOQA
     25 from processing.tools.general import (
     26     algorithmHelp,
     27     run,
   (...)     30     execAlgorithmDialog,
     31 )
     32 from processing.tools.vector import *  # NOQA

File /opt/anaconda3/envs/solweig_bw0/share/qgis/python/qgis/utils.py:1100, in _import(name, globals, locals, fromlist, level)
   1096                     _RemoveDllDirectory(_import_paths.pop(p))
   1098             _import_path = new_path
-> 1100 mod = _builtin_import(name, globals, locals, fromlist, level)
   1102 if mod and getattr(mod, "__file__", None):
   1103     module_name = mod.__name__ if fromlist else name

File /opt/anaconda3/envs/solweig_bw0/share/qgis/python/plugins/processing/tools/general.py:33
     20 __copyright__ = "(C) 2013, Victor Olaya"
     22 from qgis.core import (
     23     QgsApplication,
     24     QgsProcessingAlgorithm,
   (...)     31     QgsProject,
     32 )
---> 33 from processing.core.Processing import Processing
     34 from processing.gui.Postprocessing import handleAlgorithmResults
     35 from processing.gui.AlgorithmDialog import AlgorithmDialog

File /opt/anaconda3/envs/solweig_bw0/share/qgis/python/qgis/utils.py:1100, in _import(name, globals, locals, fromlist, level)
   1096                     _RemoveDllDirectory(_import_paths.pop(p))
   1098             _import_path = new_path
-> 1100 mod = _builtin_import(name, globals, locals, fromlist, level)
   1102 if mod and getattr(mod, "__file__", None):
   1103     module_name = mod.__name__ if fromlist else name

File /opt/anaconda3/envs/solweig_bw0/share/qgis/python/plugins/processing/core/Processing.py:46
     29 from qgis.utils import iface
     30 from qgis.core import (
     31     QgsMessageLog,
     32     QgsApplication,
   (...)     44     QgsRuntimeProfiler,
     45 )
---> 46 from qgis.analysis import QgsNativeAlgorithms
     48 import processing
     49 from processing.core.ProcessingConfig import ProcessingConfig

File /opt/anaconda3/envs/solweig_bw0/share/qgis/python/qgis/utils.py:1100, in _import(name, globals, locals, fromlist, level)
   1096                     _RemoveDllDirectory(_import_paths.pop(p))
   1098             _import_path = new_path
-> 1100 mod = _builtin_import(name, globals, locals, fromlist, level)
   1102 if mod and getattr(mod, "__file__", None):
   1103     module_name = mod.__name__ if fromlist else name

File /opt/anaconda3/envs/solweig_bw0/share/qgis/python/qgis/analysis/__init__.py:26
     22 __copyright__ = '(C) 2014, Nathan Woodrow'
     24 from qgis.PyQt import QtCore
---> 26 from qgis._analysis import *
     27 from qgis.core import Qgis as _Qgis
     29 # preserve API compatibility following QgsExifTools moved to core

File /opt/anaconda3/envs/solweig_bw0/share/qgis/python/qgis/utils.py:1100, in _import(name, globals, locals, fromlist, level)
   1096                     _RemoveDllDirectory(_import_paths.pop(p))
   1098             _import_path = new_path
-> 1100 mod = _builtin_import(name, globals, locals, fromlist, level)
   1102 if mod and getattr(mod, "__file__", None):
   1103     module_name = mod.__name__ if fromlist else name

ImportError: libgsl.so.25: cannot open shared object file: No such file or directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions