|
37 | 37 | args = parser.parse_args() |
38 | 38 |
|
39 | 39 | NPM_CMD = "npm.cmd" if sys.platform == "win32" else "npm" |
40 | | -PIP_CMD = "pip3" if which("pip3") else "pip" # mac only have pip3, so we need use pip3 instead pip |
| 40 | +PIP_CMD = [sys.executable, "-m", "pip"] |
41 | 41 |
|
42 | 42 | class bcolors: |
43 | 43 | HEADER = '\033[95m' |
@@ -154,12 +154,12 @@ def install_py_deps(deps_list): |
154 | 154 | if sys.prefix == sys.base_prefix: |
155 | 155 | # pass --break-system-packages to permit installing packages into EXTERNALLY-MANAGED Python installations. see https://github.com/pypa/pip/issues/11780 |
156 | 156 | if get_distro() != "guix" and os.path.exists(os.path.join(sysconfig.get_path("stdlib", sysconfig.get_default_scheme() if hasattr(sysconfig, "get_default_scheme") else sysconfig._get_default_scheme()),"EXTERNALLY-MANAGED")): |
157 | | - command = [PIP_CMD, 'install', '--user', '--break-system-packages', '-U'] |
| 157 | + command = PIP_CMD + ['install', '--user', '--break-system-packages', '-U'] |
158 | 158 | else: |
159 | | - command = [PIP_CMD, 'install', '--user', '-U'] |
| 159 | + command = PIP_CMD + ['install', '--user', '-U'] |
160 | 160 | else: |
161 | 161 | # if running on a virtual env, --user option is not valid. |
162 | | - command = [PIP_CMD, 'install', '-U'] |
| 162 | + command = PIP_CMD + ['install', '-U'] |
163 | 163 | command.extend(deps_list) |
164 | 164 | try: |
165 | 165 | run_command(command) |
|
0 commit comments