Skip to content

Commit 74580b1

Browse files
authored
Merge pull request #10022 from pradyunsg/better-root-message
Rephrase the warning printed when run as root on Unix
2 parents 5ee933a + 8b521e2 commit 74580b1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pip/_internal/cli/req_command.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,9 @@ def warn_if_run_as_root():
177177
if os.getuid() != 0:
178178
return
179179
logger.warning(
180-
"Running pip as root will break packages and permissions. "
181-
"You should install packages reliably by using venv: "
180+
"Running pip as the 'root' user can result in broken permissions and "
181+
"conflicting behaviour with the system package manager. "
182+
"It is recommended to use a virtual environment instead: "
182183
"https://pip.pypa.io/warnings/venv"
183184
)
184185

0 commit comments

Comments
 (0)