Score:0

How to configure common folder as pip cache for across all users?

jp flag

Situation:

  • I have multiple users with their home folders under /home.
  • All of them are added to a group, e.g., pipcache, with read-write permissions on a common folder (e.g., /home/pipcache).

Yet, I'm unable to make use of the cache folder: if user-a downloads xyz package, it gets cached, but when user-b later downloads the same xyz package, it doesn't use the cached version, but re-downloads it. Both users use the same environment (Python=3.10 and pip=23.1.2).

Here's the setup for group and folder:

groupadd pipcache
mkdir /home/pipcache
chgrp -R pipcache /home/pipcache
chmod g+w /home/pipcache

And here's how I'm setting up the users:

useradd -m user-a
adduser user-a pipcache

I don't think this is such a rare problem I'm facing and still I wasn't able to find anything online except:

File permissions for cache shared between multiple users #11012.

kanehekili avatar
zw flag
What happens if you install the pip packages as "sudo". (I usually do this on embedded devices). The packages will be installed for everyone to see and use. Mind that you should only install packages this way that will not interfere with existing ones
paladin avatar
kr flag
Make sure all users have also write access to all files.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.