Skip to content

Commit 0b5f061

Browse files
committed
fix dependency resolver on macos
1 parent 6b60e94 commit 0b5f061

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pum/dependency_handler.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,12 @@ def pip_install(self, install_path: str):
9191
def python_command(self):
9292
# python is normally found at sys.executable, but there is an issue on windows qgis so use 'python' instead
9393
# https://github.com/qgis/QGIS/issues/45646
94-
return "python" if os.name == "nt" else sys.executable
94+
if os.name == "nt":
95+
return "python"
96+
97+
# On macOS, sys.executable points to QGIS app itself, not the Python interpreter
98+
# Check if we're running inside QGIS and use python3 instead
99+
if sys.executable and ("QGIS" in sys.executable or sys.executable.endswith("QGIS")):
100+
return "python3"
101+
102+
return sys.executable

0 commit comments

Comments
 (0)