On 2023-11-05, Karsten Hilbert <karsten.hilb...@gmx.net> wrote: > Am Fri, Nov 03, 2023 at 01:53:32PM -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. >> >> These days they don't even need to be "activated". For package 'foo' >> for example you could create /usr/local/lib/foo, under which you would >> create a virtual environment and install the 'foo' package inside it, >> and then you could do: >> >> ln -s /usr/local/lib/foo/env/bin/foo /usr/local/bin/foo >> >> and then you could just type 'foo' to run it. > > This all being nice and well, but: > > 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. -- https://mail.python.org/mailman/listinfo/python-list