Changeset 29a37b4


Ignore:
Timestamp:
04/21/2022 03:22:12 PM (2 years ago)
Author:
William Harrington <kb0iic@…>
Branches:
arm
Children:
e68c6d4
Parents:
9721cf8
git-author:
Bruce Dubbs <bdubbs@…> (04/17/2022 05:55:48 PM)
git-committer:
William Harrington <kb0iic@…> (04/21/2022 03:22:12 PM)
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

    r9721cf8 r29a37b4  
    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.