Skip to content

Commit

Permalink
installer: run pip with --no-user
Browse files Browse the repository at this point in the history
On Windows, when Python is installed from the Microsoft Store, pip is
configured to always run with the --user option.

In any other environment, where the user may have forced the user of
--user, this will also break the installer.

The --no-user option will override any default set in pip.ini.

Fixes python-poetry#4195
  • Loading branch information
yrro committed Jun 22, 2021
1 parent 8a2eaad commit dea343d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install-poetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def make_env(self, version: str) -> Path:

with temporary_directory() as tmp_dir:
subprocess.check_call(
[sys.executable, "-m", "pip", "install", "virtualenv", "-t", tmp_dir],
[sys.executable, "-m", "pip", "install", "virtualenv", "--no-user", "-t", tmp_dir],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
)
Expand Down

0 comments on commit dea343d

Please sign in to comment.