Can pip install packages for all users (on a Linux system)?
john_ladasky at sbcglobal.net
Tue Jul 24 14:07:36 EDT 2018
I've been using "sudo pip3 install" to add packages from the PyPI repository. I have multiple user accounts on the computer in question. My goal is to install packages that are accessible to all user accounts. I know that using the Synaptic Package Manager in Ubuntu will install for all users, but not every Python package is included in the Canonical repository.
I hadn't noticed any discrepancies until recently. I upgraded from Ubuntu 17.10 to 18.04. In parallel, I upgraded tensorflow-gpu 1.4.0 to 1.8.0. Everything worked on my main account. However, attempting to import tensorflow from Python on a secondary account failed. Eventually I checked the pip lists in each account, and I found a reference to the old tensorflow 1.4 on the secondary account. Uninstalling that, and reinstalling tensorflow-gpu 1.8 on the secondary account fixed the problem.
I believe that I now have tensorflow 1.8 installed twice on my system, once for each user. If anyone can share how to convince pip to behave like Synaptic, I would appreciate it. Thanks.
More information about the Python-list