pip/pip3 confusion and keeping up to date

Chris Green cl at isbd.net
Fri Nov 3 06:05:09 EDT 2023


Jon Ribbens <jon+usenet at unequivocal.eu> wrote:
> On 2023-11-02, Chris Green <cl at isbd.net> wrote:
> > Jon Ribbens <jon+usenet at unequivocal.eu> wrote:
> >> On 2023-11-02, Chris Green <cl at isbd.net> wrote:
> >> > I have a couple of systems which used to have python2 as well as
> >> > python3 but as Ubuntu and Debian verions have moved on they have
> >> > finally eliminated all dependencies on python2.
> >> >
> >> > So they now have only python3 and there is no python executable in
> >> > PATH. 
> >> >
> >> > There's still both /usr/bin/pip and /usr/bin/pip3 but they're
> >> > identical so presuably I can now simply use pip and it will be a
> >> > python3 pip.
> >> >
> >> >
> >> > So, going on from this, how do I do the equivalent of "apt update; apt
> >> > upgrade" for my globally installed pip packages?
> >> 
> >> I'm not sure what that question has to do with everything that preceded
> >> it, but you don't want to install python packages globally using pip.
> >> Either install them with 'apt', or install them in a virtual environment.
> >
> > Why in a virtual environment?  When I install a package whether from
> > apt or from pip I want everyone/everything on my system to be able to
> > use it.
> 
> Because pip barely plays well by itself, let alone with other package
> managers at the same time.
> 
Well that's a criticism of pip rather than of how I use it! :-)

OK, there are risks.


> > I do only install a few things using pip.
> 
> Are they not available in your system's package manager?
> I guess you might get away with "sudo -H pip install -U foo"
> for a couple of things, if they don't have many dependencies.

I obviously check the package manager and also other sources which
work through apt before resorting to using pip.

The sort of thing I have to use pip for is software for odd I2C sensor
devices and such.  These rarely have any dependencies or they are all
the same dependencies as the other I2C device software.  So,
hopefully, I won't hit any big problems.  I have to say that so far I
haven't been bitten.  

I would point out that this is mostly for a headless Beaglebone Black
single board computer (comparable with a Raspberry Pi) with only a
minimal 'console' installation of Debian so it's a pretty minimal
system.

-- 
Chris Green
·


More information about the Python-list mailing list