Deutsch   English   Français   Italiano  
<mailman.43.1716278596.2909.python-list@python.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: Roel Schroeven <roel@roelschroeven.net>
Newsgroups: comp.lang.python
Subject: Re: pip and venvs on Debian
Date: Tue, 21 May 2024 10:03:09 +0200
Lines: 24
Message-ID: <mailman.43.1716278596.2909.python-list@python.org>
References: <fqN0O.38287$ZZU.19060@fx07.ams4>
 <TUI-20240515112645@ram.dialup.fu-berlin.de> <v23j1c$15nao$4@dont-email.me>
 <Pvs1O.8533$H1X8.1544@fx05.ams4> <20240518151913.w5qqsw67gndy57ry@hjp.at>
 <4VhVBk0sy7znVGB@mail.python.org>
 <dc837fb2-fee3-4d7c-81b1-fa70cacdc3bf@wichmann.us>
 <mailman.19.1716055464.2909.python-list@python.org> <hl7nhk-165.ln1@lazy.lzy>
 <a0b970e1-6c17-444d-a720-756fc9700a81@yahoo.co.uk>
 <ZkvFHHmFgsl1VKie@shallowsky.com>
 <4d75c169-733f-44b6-aada-1f86785a61d2@roelschroeven.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de 2KhejqeTWcL1Xtd8tjyESAuLDyuANK57WNu8b4W2zArQ==
Cancel-Lock: sha1:ZzaMyuK8reInc9Wg99zTTuvtRho= sha256:EXX/vSOmm5Cfo16TP5WT56fARokuJ9nHfkzNjtVJHvw=
Return-Path: <roel@roelschroeven.net>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
 reason="2048-bit key; unprotected key"
 header.d=roelschroeven.net header.i=@roelschroeven.net
 header.b=sbUqUdjr; dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.020
X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'pip': 0.04; 'debian':
 0.09; 'dependencies': 0.09; 'freeze': 0.09; 'meant': 0.09; 'it."':
 0.16; 'pip,': 0.16; 'predictable': 0.16; 'received:10.202': 0.16;
 'received:10.202.2': 0.16; 'received:10.202.2.163': 0.16;
 'received:10.202.2.47': 0.16; 'received:64.147': 0.16;
 'received:64.147.123': 0.16; 'received:internal': 0.16;
 'received:messagingengine.com': 0.16; 'schreef': 0.16; 'specify':
 0.16; 'subject:pip': 0.16; 'want,': 0.16; 'python': 0.16; 'to:addr
 :python-list': 0.20; "what's": 0.22; 'science': 0.22; 'install':
 0.23; 'installed': 0.23; 'cannot': 0.25; 'robert': 0.26; "isn't":
 0.27; 'old': 0.27; 'output': 0.28; 'environment': 0.29; 'header
 :User-Agent:1': 0.30; 'packages': 0.31; 'program': 0.31; 'think':
 0.32; 'but': 0.32; 'use,': 0.33; 'package': 0.34; 'header:In-
 Reply-To:1': 0.34; 'usual': 0.35; 'cases': 0.36; "it's": 0.37;
 'file': 0.38; 'way': 0.38; 'means': 0.38; 'text': 0.39; 'use':
 0.39; 'exact': 0.40; 'try': 0.40; 'should': 0.40; 'lack': 0.60;
 'love': 0.62; 'subject': 0.63; 'feel': 0.63; 'everything': 0.63;
 'security': 0.64; 'updates': 0.64; 'your': 0.64; 'well': 0.65;
 'choose': 0.67; 'received:64': 0.67; 'per': 0.68; '"you': 0.69;
 'easy': 0.74; 'biggest': 0.84; '(like': 0.84; 'me:': 0.91;
 'duplicate': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 roelschroeven.net; h=cc:content-transfer-encoding:content-type
 :content-type:date:date:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to; s=fm3; t=1716278592; x=1716364992; bh=BAanhuwgakN8wclQORct7
 R7J9Z2WWOPqjEx6lrl7zT8=; b=sbUqUdjrhfNFRDAqFfjhsSYJYK4nd9kcQig8V
 2GHSnG3g8SY9y6SIH1wxaC8CmqEbmWdMPLaTiWuP5SvQr2qevExnhxM6f9nLRarZ
 xFEnsOM48/baoEYuJqi5sAIW19SZTaeFdHLE/mn6Ruik3zqy1MIywyPiUGgn3PFl
 vF4KxG8W4HX6ljaA5qY9Tc9zXmQhBUGWU1nKmOAMJl64yymFX52QxOUCeIt3uCcJ
 7KbnFjN2SJxHoSlRfHJvhf4kKXImmI1LfSRZsQW/oqu+6c3Wp4daoUjyI6gnDkIZ
 0Akj922EOKzBfVTJN2sqYvAKZOlCMK+uQfOcF3uM0dk+Hr+8w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1716278592; x=
 1716364992; bh=BAanhuwgakN8wclQORct7R7J9Z2WWOPqjEx6lrl7zT8=; b=W
 H+mOtbOKq9m6i3isl+EN44gNUl/eSG5cG6JOrkEB+4Da4VtSHjQhRACLxyViErMQ
 0b6hhTYEhCNv6CrBC0bDg1DcIrTDz3M1qlig+2ncx7tGPNWaMIzaNB8HZfjXXhyF
 2iBPiLx0fbIQrJsIeBXIfa9n91H9Vpyk06GIJfAkk3N2PHkcnnhjwnPkBuvs2NDe
 nphbZ7Lv+e1E5tF7xmFhYHHvZSY7HuLKuQG6ihEBnZBlwtgJGB0DyiQLRLKA+biK
 9tgbHRgpj8v0GiEj6uaqYhgZRsv3uxDk5Vmv9v5/g2qA1h0emBkqEvDwaltthn1L
 DPNoONKoypTqMdrgEvX7A==
X-ME-Sender: <xms:P1VMZp0X0itojnEwrNsd_WUnB1dF39yrWfumow6Fp6DRYZSFNbU5Bg>
 <xme:P1VMZgE4XZxq819YCQ5wR3mTT01Kn3C-nL_o-uPOtdq670q42ix_VAq8sZPU8JIjL
 nyg4MHscdlD>
X-ME-Received: <xmr:P1VMZp4WTsqYriehDIgF6NLLEfKRJWKfMEYosx2w_1DNQNXXJe5SfOXOgdH3RAvPliU5Fbrpd2GhNPTE4VU0-0095P_UelqxaYItlaWYMMbHGn8>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeiuddguddvhecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesth
 ejredttddvjeenucfhrhhomheptfhovghlucfutghhrhhovghvvghnuceorhhovghlsehr
 ohgvlhhstghhrhhovghvvghnrdhnvghtqeenucggtffrrghtthgvrhhnpeekgfefudeuhe
 dvkeefjeehvdeljeelfffhtdegteejtdeufeeffefhveetudffueenucevlhhushhtvghr
 ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrohgvlhesrhhovghlshgthh
 hrohgvvhgvnhdrnhgvth
X-ME-Proxy: <xmx:P1VMZm0BHW5a5H6bnHYB98PFTp4-lf9w3WH4J_vl_KrEmvz6LzQBpw>
 <xmx:P1VMZsFNYQTJxjZrMjDYgdfqg3GWRVdAVtg_9Un-ajEPGkCs3ULY1w>
 <xmx:P1VMZn8dHNah4cAhqnAczHdsYwvrJ5A6_0XnGvm_8-VQoct4cQar2w>
 <xmx:P1VMZpk6KjLHS5xnCdOuKTdiUEGFmksN0smelGFcRN1B-bcOJJi-Pg>
 <xmx:QFVMZmPttziPPTKl2dbTaIWhaDToz2NCz2j0MbszWSYWV0RRHeTqvF47>
Feedback-ID: i8e5b41ae:Fastmail
User-Agent: Mozilla Thunderbird
Content-Language: nl, en-US
In-Reply-To: <ZkvFHHmFgsl1VKie@shallowsky.com>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
 <python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
 <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
 <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <4d75c169-733f-44b6-aada-1f86785a61d2@roelschroeven.net>
X-Mailman-Original-References: <fqN0O.38287$ZZU.19060@fx07.ams4>
 <TUI-20240515112645@ram.dialup.fu-berlin.de> <v23j1c$15nao$4@dont-email.me>
 <Pvs1O.8533$H1X8.1544@fx05.ams4> <20240518151913.w5qqsw67gndy57ry@hjp.at>
 <4VhVBk0sy7znVGB@mail.python.org>
 <dc837fb2-fee3-4d7c-81b1-fa70cacdc3bf@wichmann.us>
 <mailman.19.1716055464.2909.python-list@python.org> <hl7nhk-165.ln1@lazy.lzy>
 <a0b970e1-6c17-444d-a720-756fc9700a81@yahoo.co.uk>
 <ZkvFHHmFgsl1VKie@shallowsky.com>
Bytes: 8694

Op 20/05/2024 om 23:48 schreef Akkana Peck via Python-list:
> 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 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.
If you have a requirements.txt file with all packages you want, I think 
you can do pip -install --upgrade -r requirements.txt to update them 
all. That only works if you don't specify exact versions in the 
requirements.txt file, so don't use the output of pip freeze to generate 
that requirements file. Just create it yourself: it's a simple text file 
with one package per line. Also I prefer not to include dependencies in 
it for use cases like this (it's another story for packaging, where it 
can be useful or requirements.txt to mirror your exact environment with 
dependencies and specific versions).

Having such a requirements.txt file also makes it easier to install all 
the packages again after you re-create your venv.

-- 
"I love science, and it pains me to think that to so many are terrified
of the subject or feel that choosing science means you cannot also
choose compassion, or the arts, or be awed by nature. Science is not
meant to cure us of mystery, but to reinvent and reinvigorate it."
         -- Robert Sapolsky