Changeset e953813


Ignore:
Timestamp:
04/17/2022 05:55:48 PM (2 years ago)
Author:
Bruce Dubbs <bdubbs@…>
Branches:
11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, bdubbs/gcc13, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
7a0687c
Parents:
75bab32
Message:

Suppress a waring if running pip3 as root.

In serveral places we use the pip3 command to install Python 3 programs
and modules for all users as root. This conflicts with the Python
developers' recommendation to build packages in a virtual environment as
a regular user. To this end, a multi-line warning is written when using
pip3 as the root user.

This change shows users how to avoid this warning.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/python.xml

    r75bab32 re953813  
    9292
    9393<screen><userinput remap="install">make install</userinput></screen>
     94
     95    <para>In serveral places we use the <command>pip3</command> command to
     96    install Python 3 programs and modules for all users as root. This conflicts
     97    with the Python developers recommendation to build packages in a virtual
     98    environment as a regular user. To this end, a multi-line warning is
     99    written when using <command>pip3</command> as the root user.  If desired,
     100    supress this warning by running the following command:</para>
     101
     102<screen><userinput remap="install">sed -e '/def warn_if_run_as_root/a\    return' \
     103    -i /usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py
     104</userinput></screen>
     105
    94106
    95107    <para>If desired, install the preformatted documentation:</para>
Note: See TracChangeset for help on using the changeset viewer.