Commit b9ed1f05 by Randy Döring

env: prefer "python -m pip" to calling pip directly to allow pip updating itself on Windows

parent 3bdc3972
......@@ -1393,7 +1393,10 @@ class Env:
raise NotImplementedError()
def get_pip_command(self, embedded: bool = False) -> list[str]:
return [self.python, self.pip_embedded if embedded else self.pip]
if embedded or not Path(self._bin(self._pip_executable)).exists():
return [self.python, self.pip_embedded]
# run as module so that pip can update itself on Windows
return [self.python, "-m", "pip"]
def get_supported_tags(self) -> list[Tag]:
raise NotImplementedError()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment