Skip to content

Commit 2d6665e

Browse files
authored
Merge pull request #16 from angusmcb/python_command
switch python command according to os
2 parents 8b289b4 + 521be1e commit 2d6665e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

a00_qpip/plugin.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,13 @@ def pip_install_reqs(self, reqs_to_install):
251251
os.makedirs(self.prefix_path, exist_ok=True)
252252
log(f"Will pip install {reqs_to_install}")
253253

254+
# python is normally found at sys.executable, but there is a bug on windows qgis so use 'python' instead
255+
# https://github.com/qgis/QGIS/issues/45646
256+
python_command = 'python' if os.name == 'nt' else sys.executable
257+
254258
run_cmd(
255259
[
256-
sys.executable,
260+
python_command,
257261
"-um",
258262
"pip",
259263
"install",

0 commit comments

Comments
 (0)