pip/pip3 confusion and keeping up to date

Karsten Hilbert Karsten.Hilbert at gmx.net
Mon Nov 6 16:26:36 EST 2023


Am Mon, Nov 06, 2023 at 01:17:11AM -0000 schrieb Jon Ribbens via Python-list:

> >> >> Are they not available in your system's package manager?
> >> >
> >> > ... this clearly often answers to "no" for applications of
> >> > any complexity.
> >> >
> >> > Is there a suggested proper path to deal with that (Debian is
> >> > of interest to me here) ?
> >>
> >> Yes, as previously mentioned, use virtual environments.
> >>
> > How does one "fill" that venv with packages from pip during
> >
> > 	apt-get install python3-app-of-interest
> >
> > ?
> >
> > Is the suggested way really to pip-install into this venv
> > during apt-get install ?
>
> I don't know what you mean by that. But if you install the apt packages
> and then create your venv with --system-site-packages then I believe
> your venv should be able to see the apt packages and import them.

The problem is when there's modules not available via apt as
packages. In that case on needs to either package them or pip
them into the venv suggested above.

When they are apt-gettable no venv is needed in the first
place. One would just install the application script like any
other binary, and which loads apt-installed modules just so.

Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B


More information about the Python-list mailing list