On BSD systems, pip warns about being executed as root, even though it is not being executed as root · Issue #10565 · pypa/pip (original) (raw)

Description

On BSD systems, pip warns about being executed as root, even though it is not being executed as root.

For example:

$ id uid=1000(nathan) gid=1000(nathan) groups=1000(nathan), 0(wheel), 9(wsrc), 21(wobj) $ pip install youtube-dl --upgrade --user Requirement already satisfied: youtube-dl in ./.local/lib/python3.8/site-packages (2021.6.6) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

Expected behavior

Only warn about executing pip as root if root is in use.

pip version

21.2.4

Python version

3.8.12

OS

OpenBSD 6.9

How to Reproduce

  1. Run a pip install command on OpenBSD, NetBSD, or FreeBSD.

Output

$ pip install pip --upgrade --user Requirement already satisfied: pip in ./.local/lib/python3.8/site-packages (21.2.4) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

Code of Conduct