Closed luzfcb closed 1 year ago
Sorry for taking so long to get to this. I hadn't realized COVID's effects on society were rolling me down into a hole and wound up silently dropping all my hobby projects on the floor.
I'll add an entry for you to the AUTHORS
file in a moment.
Done. aea621c9e187691dcd30955e2e17b43527503582
Description
This pr update the docs and some scripts to include
-H
argument onsudo
when using pip to avoid creating files with root permissions on non-root pip cache directoryRationale
After pip 6.0.0 (I don't remember which exact version this was included with.), by default pip creates a cache directory in
$HOME/.cache/pip/
and store the wheel/egg packages. The$HOME
is the current user home directory.When we use:
pip
will continue to use the current user's pip cache directory, however, new files and directories within the cache folder will be created with the owner defined asroot
, that is, we will end up having files and a directory inside the current user home that the current user cannot read or write without root permission.This is not a problem that pip can solve on its own. This is where the
sudo
-H
argument comes in. The best explanation of what-H
does comes from thesudo
documentationThat is, with
sudo -H
pip will use/root/.cache/pip
instead of/home/<my-user>/.cache/pip/
.Whenever we need to install some python package with
pip
andsudo
is necessary, it is recommended to use-H
insudo
to avoid future headaches.