Can pip install packages for all users (on a Linux system)?
john_ladasky at sbcglobal.net
Thu Jul 26 01:44:49 EDT 2018
On Wednesday, July 25, 2018 at 7:15:35 AM UTC-7, Stephan Houben wrote:
> Op 2018-07-24, John Ladasky schreef <j..y at s...t>:
> > 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.
> I would recommend against using pip to install packages into the system
> Python. The reason is that you may get into a conflict with the package
> manager. You can try to be careful and not install tensorflow using
> Synaptic, but once you install some other package which happens to
> depend on tensorflow, you will start getting package manager conflicts.
That won't be a problem. Tensorflow is not available in the Canonical repository, so it cannot be installed through Synaptic unless someone has made a PPA somewhere. I don't know why Tensorflow is not part of Canonical, since it is free, open-source, and popular.
I don't (yet) have any that depends on tensorflow. Tensorflow's Python API depends on other software, the NVidia drivers and CUDA for example. But that's the opposite issue. And I did install those manually.
> An alternative is to install Python yourself (from source, without the package
> manager) in, say, /opt/python. You are then in splendid isolation from
> the package manager and can install any version of Python and tensorflow
> you desire.
That's an interesting strategy, and I will consider it. Two copies of Python are easier to accept than two copies of tensorflow.
More information about the Python-list