pip and venvs on Debian (was: Terminal Emulator)

Liste des GroupesRevenir à cl python 
Sujet : pip and venvs on Debian (was: Terminal Emulator)
De : akkana (at) *nospam* shallowsky.com (Akkana Peck)
Groupes : comp.lang.python
Date : 20. May 2024, 23:48:12
Autres entêtes
Message-ID : <mailman.42.1716242260.2909.python-list@python.org>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Mutt/2.2.12 (2023-09-09)
Alan Gauld via Python-list writes:
On 18/05/2024 19:12, Piergiorgio Sartor via Python-list wrote:
 
So venvs make managing all that pretty convenient. Dunno why everybody's
so down on venvs...
 
Not so much down on them, they are just one extra step that's
mostly not needed(in my use case)

Years ago, I used to have trouble with pip install --user on Debian -- sometimes things would end up under .local, sometimes in other places that I've forgotten. So I reluctantly started using venvs.

And you know, they work fine. I have one master venv that I created with
python3 -m venv --system-site-packages ~/pythonenv/envname
and I activate that automatically when I log in, so when I need to install anything that Debian doesn't package, I just pip install it (no --user or --break-system-packages needed) and it installs to that venv.

Every so often I need to regenerate it (like when Debian updates the system Python version) but that's easy to do: I don't try to duplicate what's installed there, I just delete the old venv, create a new one and then pip install packages as needed.

I have a few special venvs (without --system-site-packages) for specific purposes, but most of the time I'm just using my default venv and it's all pretty transparent and automatic.

I know this isn't the usual pythonista model of "you should have a zillion different venvs, one for each program you use, and never use system Python packages", but it works well for me: my pip installed packages are all in a predictable place, and I get security updates for all the software Debian *does* package. That's my biggest beef with pip, the lack of an easy way to update everything at once, and it's the reason I prefer Debian packages when available.

        ...Akkana

Date Sujet#  Auteur
15 May 24 * Re: Terminal Emulator20Stefan Ram
16 May 24 `* Re: Terminal Emulator (Posting On Python-List Prohibited)19Lawrence D'Oliveiro
17 May 24  +- Re: Terminal Emulator (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
18 May 24  +- Re: Terminal Emulator (Posting On Python-List Prohibited)1Peter J. Holzer
18 May 24  +- Re: Terminal Emulator (Posting On Python-List Prohibited)1Grant Edwards
18 May 24  +* Re: Terminal Emulator (Posting On Python-List Prohibited)14Mats Wichmann
18 May 24  i`* Re: Terminal Emulator (Posting On Python-List Prohibited)13Piergiorgio Sartor
19 May 24  i +* venvs vs. package management (was: Terminal Emulator (Posting On Python-List Prohibited))3Peter J. Holzer
19 May 24  i i`* Re: venvs vs. package management2Piergiorgio Sartor
20 May 24  i i `- Re: venvs vs. package management1Left Right
19 May 24  i +* Re: Terminal Emulator (Posting On Python-List Prohibited)5Alan Gauld
19 May 24  i i+- Re: Terminal Emulator (Posting On Python-List Prohibited)12QdxY4RzWzUUiLuE
19 May 24  i i+- Re: Terminal Emulator (Posting On Python-List Prohibited)1MRAB
19 May 24  i i+- Re: Terminal Emulator (Posting On Python-List Prohibited)12QdxY4RzWzUUiLuE
20 May 24  i i`- Re: Terminal Emulator (Posting On Python-List Prohibited)1Grant Edwards
19 May 24  i +- Re: Terminal Emulator (Posting On Python-List Prohibited)1Grant Edwards
19 May 24  i +- Re: Terminal Emulator (Posting On Python-List Prohibited)1Thomas Passin
20 May 24  i +- pip and venvs on Debian (was: Terminal Emulator)1Akkana Peck
21 May 24  i `- Re: pip and venvs on Debian1Roel Schroeven
18 May 24  `- Re: Terminal Emulator (Posting On Python-List Prohibited)1Grant Edwards

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal