mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-06 06:14:47 +00:00
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.
This commit is contained in:
parent
75bab32f83
commit
e9538133fa
@ -92,6 +92,18 @@
|
||||
|
||||
<screen><userinput remap="install">make install</userinput></screen>
|
||||
|
||||
<para>In serveral places we use the <command>pip3</command> 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 <command>pip3</command> as the root user. If desired,
|
||||
supress this warning by running the following command:</para>
|
||||
|
||||
<screen><userinput remap="install">sed -e '/def warn_if_run_as_root/a\ return' \
|
||||
-i /usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py
|
||||
</userinput></screen>
|
||||
|
||||
|
||||
<para>If desired, install the preformatted documentation:</para>
|
||||
|
||||
<screen><userinput remap="install">install -v -dm755 /usr/share/doc/python-&python-version;/html
|
||||
|
Loading…
Reference in New Issue
Block a user