Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

The biggest difference between time and space is that you can't reuse time. -- Merrick Furst


devel / comp.lang.python / Re: PYTHONPATH vs Python Virtual Environment

SubjectAuthor
o Re: PYTHONPATH vs Python Virtual EnvironmentDieter Maurer

1
Re: PYTHONPATH vs Python Virtual Environment

<mailman.10.1644002741.7010.python-list@python.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=21318&group=comp.lang.python#21318

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: dieter@handshake.de (Dieter Maurer)
Newsgroups: comp.lang.python
Subject: Re: PYTHONPATH vs Python Virtual Environment
Date: Fri, 4 Feb 2022 20:25:33 +0100
Lines: 15
Message-ID: <mailman.10.1644002741.7010.python-list@python.org>
References: <AS8PR06MB7592E5A5D8ECE41C599E2963AD299@AS8PR06MB7592.eurprd06.prod.outlook.com>
<25085.32173.663142.706239@ixdm.fritz.box>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de WDyQJXrvbL+jprNxFKQZxAP7KVBDFogaoYJZTSKtIQoQ==
Return-Path: <dieter@handshake.de>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.031
X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'pip': 0.04; 'bin': 0.09;
'cc:addr:python-list': 0.09; 'locally': 0.09; 'subject:Python':
0.12; 'things,': 0.16; 'wrapper': 0.16; 'problem': 0.16; 'python':
0.16; 'applications': 0.17; "can't": 0.17; 'cc:addr:python.org':
0.20; 'option': 0.20; 'maybe': 0.22; 'install': 0.23; 'tutorials':
0.23; 'received:de': 0.23; 'cc:2**0': 0.25; 'environment': 0.29;
'recently': 0.29; 'packages': 0.31; 'approach': 0.31; 'think':
0.32; 'everyone': 0.32; 'but': 0.32; 'same': 0.34; 'mean': 0.34;
'package': 0.34; 'header:In-Reply-To:1': 0.34; 'target': 0.36;
'using': 0.37; "it's": 0.37; 'directory': 0.37; 'way': 0.38;
'use': 0.39; 'wrote': 0.39; 'your': 0.64; 'header:Received:6':
0.67; 'compare': 0.69; 'virtual': 0.71; 'global.': 0.84; 'offer?':
0.84; 'received:88': 0.84; 'subject:Virtual': 0.84;
'to:addr:outlook.com': 0.84
In-Reply-To: <AS8PR06MB7592E5A5D8ECE41C599E2963AD299@AS8PR06MB7592.eurprd06.prod.outlook.com>
X-Mailer: VM 8.0.12-devo-585 under 21.4 (patch 24) "Standard C" XEmacs Lucid
(x86_64-linux-gnu)
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: <25085.32173.663142.706239@ixdm.fritz.box>
X-Mailman-Original-References: <AS8PR06MB7592E5A5D8ECE41C599E2963AD299@AS8PR06MB7592.eurprd06.prod.outlook.com>
 by: Dieter Maurer - Fri, 4 Feb 2022 19:25 UTC

Sina Mobasheri wrote at 2022-2-4 15:55 +0000:
>it's not good title defiantly and I don't mean to compare apples and oranges
>
>when I start using python virtual environment it was because isolation proposes and everyone say about its benefits in isolation and working with different versions of the same package in different projects
>
>but recently I start using pip install --target <package> for zipapp<https://docs.python.org/3.10/library/zipapp.html#creating-standalone-applications-with-zipapp> things, and then I use this pip's option (--target) and add its target folder to PYTHONPATH and target folder's bin directory to PATH, so it's like virtual environment to me
>
>I'm curious what is a problem with this approach (edges), what are other benefits of the virtual environment that this way can't offer? most tutorials talk about isolation and managing of packages versions but I think maybe it's more than that maybe?

Usually, PYTHONPATH is global.
This can make a problem when you have different applications
which require different package versions.

Of course, you can use a wrapper for your application which locally
sets PYTHONPATH appropriately.


devel / comp.lang.python / Re: PYTHONPATH vs Python Virtual Environment

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor