update qgis path
This commit is contained in:
parent
e95cfc945f
commit
e1fcc0eada
|
|
@ -40,29 +40,29 @@
|
|||
|
||||
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# QGIS environment
|
||||
# === ENV for QGIS ===
|
||||
os.environ["QGIS_PREFIX_PATH"] = "/usr"
|
||||
os.environ["QGIS_HOME"] = "/usr"
|
||||
|
||||
os.environ["PROJ_LIB"] = "/usr/share/proj"
|
||||
os.environ["GDAL_DATA"] = "/usr/share/gdal"
|
||||
os.environ["QT_PLUGIN_PATH"] = "/usr/share/qgis/python/plugins"
|
||||
os.environ["QT_PLUGIN_PATH"] = "/usr/lib/x86_64-linux-gnu/qt5/plugins"
|
||||
|
||||
# Python modules (from system)
|
||||
sys.path.append("/usr/lib/python3/dist-packages")
|
||||
sys.path.append("/usr/lib/python3/dist-packages/qgis")
|
||||
sys.path.append("/usr/lib/python3/dist-packages/qgis/plugins")
|
||||
# === QGIS Python Modules ===
|
||||
sys.path.insert(0, "/usr/share/qgis/python")
|
||||
sys.path.insert(0, "/usr/share/qgis/python/plugins")
|
||||
|
||||
# QGIS Python plugins (THIS IS THE MISSING PART)
|
||||
sys.path.append("/usr/share/qgis/python")
|
||||
sys.path.append("/usr/share/qgis/python/plugins")
|
||||
sys.path.insert(0, "/usr/lib/python3/dist-packages")
|
||||
sys.path.insert(0, "/usr/lib/python3/dist-packages/qgis")
|
||||
sys.path.insert(0, "/usr/lib/python3/dist-packages/qgis/plugins")
|
||||
|
||||
# === IMPORTS ===
|
||||
from qgis.core import QgsApplication
|
||||
from qgis.analysis import QgsNativeAlgorithms
|
||||
|
||||
# processing MUST be importable now
|
||||
import processing
|
||||
from processing.core.Processing import Processing
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user