Skip to content

Commit

Permalink
Merge pull request #16 from angusmcb/python_command
Browse files Browse the repository at this point in the history
switch python command according to os
  • Loading branch information
m-kuhn committed Sep 19, 2024
2 parents 8b289b4 + 521be1e commit 2d6665e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion a00_qpip/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,13 @@ def pip_install_reqs(self, reqs_to_install):
os.makedirs(self.prefix_path, exist_ok=True)
log(f"Will pip install {reqs_to_install}")

# python is normally found at sys.executable, but there is a bug on windows qgis so use 'python' instead
# https://github.com/qgis/QGIS/issues/45646
python_command = 'python' if os.name == 'nt' else sys.executable

run_cmd(
[
sys.executable,
python_command,
"-um",
"pip",
"install",
Expand Down

0 comments on commit 2d6665e

Please sign in to comment.