Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

You will be successful in your work.


devel / comp.lang.python / Re: path to python in venv

SubjectAuthor
* path to python in venvLarry Martell
`* Re: path to python in venvJon Ribbens
 +* Re: path to python in venvLarry Martell
 |`* Re: path to python in venvJon Ribbens
 | +- Re: path to python in venvdn
 | `- Re: path to python in venvPeter J. Holzer
 +- RE: path to python in venvNiktar Lirik
 +- Re: path to python in venvLarry Martell
 `- Re: path to python in venvMats Wichmann

1
path to python in venv

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: larry.ma...@gmail.com (Larry Martell)
Newsgroups: comp.lang.python
Subject: path to python in venv
Date: Wed, 27 Sep 2023 11:53:57 -0700
Lines: 22
Message-ID: <mailman.356.1695840877.23016.python-list@python.org>
References: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de fDUY1I0iZMSQaJWfUEFAsg73ShfYR8DIWZ2tjBgtjeaw==
Cancel-Lock: sha1:wv6iCOH7gbdt1r08xYga8InlIyg= sha256:V6p5UqNOGy5zismGgUA+uzRf55UoWxdTKFABmiQM6ac=
Return-Path: <larry.martell@gmail.com>
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=gmail.com header.i=@gmail.com header.b=UXr2U03n;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.084
X-Spam-Evidence: '*H*': 0.84; '*S*': 0.01; 'subject:python': 0.06;
'bin': 0.09; 'executable': 0.16; 'interpreter': 0.16; 'isolated':
0.16; 'python3': 0.16; 'read:': 0.16; 'shortcuts': 0.16; 'python':
0.16; 'to:addr:python-list': 0.20; 'environment': 0.29; 'sep':
0.32; 'to:name:python': 0.32; 'message-id:@mail.gmail.com': 0.32;
'but': 0.32; 'received:google.com': 0.34; 'from:addr:gmail.com':
0.35; 'really': 0.37; 'using': 0.37; 'directory': 0.37; 'still':
0.40; 'happen': 0.40; 'your': 0.64; 'skip:/ 10': 0.69; 'virtual':
0.71; 'means,': 0.84; 'pointing': 0.84; 'standalone': 0.84;
'received:mail-vs1-xe2c.google.com': 0.91
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1695840874; x=1696445674; darn=python.org;
h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
:date:message-id:reply-to;
bh=pFbp/udk7rwo8SvUn9HXwCenX+usv+yfdP8IEI+QV98=;
b=UXr2U03n0Kfh1eOGLPb/UNOfvCd+JcDmH+mDhgKj3mS+D0+o3BQsfE5jpEkkDUdaT9
jQUeUQ575pIPBO1QtM/q3h83y4Jd5XhJfN9GeM9bEU86tM7QgogfRcwSQ3CrtWNKwg7m
ODPoJN9qis+4EjhPAqrNTm8yfcsoQzcZt60EgFbyuQFEIQ+rZwmQg0R1zxpkWOcvoA0C
szoyCdN0MXy0HSgZjAvDwLJsCfuq+ccGnEbHPd4VtZp/toLQL9mzX+bgv+L3eE3icyyX
MLupAxtmrYyv6x2j21Qy00ieQv6YBD/gTa685Zn+SQ/uhrOLq3sbkJLagdsTVrqvgmdO
uihQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1695840874; x=1696445674;
h=to:subject:message-id:date:from:mime-version:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=pFbp/udk7rwo8SvUn9HXwCenX+usv+yfdP8IEI+QV98=;
b=db7nv2xDBJ/fOg2NZfOKBHwbQ9RsHm97giGXK0QUZ1SZgjelQ4JpSciYXaAG0luKCm
xOy2kXfLTTayNIi9CkQXdAfGEjP+glI1GJSY8BQZPo1h0p+PR6cJJWKy9CaK00FIqolk
GpEHzZEJFHL1B0yovjPUkXmEVqyvV7YgFzw9OsdlK3rklNIQF95bjQV0Qlj+GnSRXDqw
E+Bq7Si8J/PNWEhexbqMlcxlfNUmV5YlkxFI0lUEeSrg1IP36+KkcqWgbTVjsrY2UNgW
dnUclx1CDPLYm/ObGfuuwGPK/2xzLHa4ZGydFQyKGVZ97YqjyMG5LsQ+xplw1oJBqLW1
NfQg==
X-Gm-Message-State: AOJu0Yxjnc8S8F+7jq8sjqofipohZ61LfHahLyercN5yRGothoF3EJdC
GyGe5AQ8KdjfbG1MeEhX4UzhWq2BWwUrDBdynccODYiecp3h
X-Google-Smtp-Source: AGHT+IFTqmstscEqLLteksgaHGeY7S3JD3F2BdRMtnrYN+AFLTq80D1JT7Z/tppC33dl+/e0pHNRuh3pJ2xKkIMZvrk=
X-Received: by 2002:a05:6102:3c6:b0:452:78e2:4a07 with SMTP id
n6-20020a05610203c600b0045278e24a07mr2754464vsq.8.1695840873980; Wed, 27 Sep
2023 11:54:33 -0700 (PDT)
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: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
 by: Larry Martell - Wed, 27 Sep 2023 18:53 UTC

I was under the impression that in a venv the python used would be in
the venv's bin dir. But in my venvs I see this in the bin dirs:

lrwxrwxrwx 1 larrymartell larrymartell 7 Sep 27 11:21 python -> python3
lrwxrwxrwx 1 larrymartell larrymartell 16 Sep 27 11:21 python3 ->
/usr/bin/python3

Googling this I read:

The presence of symbolic links like python and python3 in the bin
directory of your virtual environment pointing to the system Python
executable (/usr/bin/python) suggests that the virtual environment was
created using the system Python interpreter rather than a standalone
Python installation.

This can happen if you create a virtual environment using a
system-wide Python interpreter, and the virtual environment inherits
some of the symbolic links or shortcuts from the system Python
installation. In this case, your virtual environment is not fully
isolated because it still relies on the system Python interpreter.

Not sure what this really means, nor how to get python to be in my venv.

Re: path to python in venv

<slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jon+use...@unequivocal.eu (Jon Ribbens)
Newsgroups: comp.lang.python
Subject: Re: path to python in venv
Date: Wed, 27 Sep 2023 18:56:39 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>
References: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
<mailman.356.1695840877.23016.python-list@python.org>
Injection-Date: Wed, 27 Sep 2023 18:56:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="21d7de4ccc5decf14936e0997709aa2a";
logging-data="3407919"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+l6bikLtWYChJgA9HGFaIoNzQ0c+TJfY="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:rlVkhxcCgN0ZE+z9YJ4MfwBAXP8=
 by: Jon Ribbens - Wed, 27 Sep 2023 18:56 UTC

On 2023-09-27, Larry Martell <larry.martell@gmail.com> wrote:
> I was under the impression that in a venv the python used would be in
> the venv's bin dir. But in my venvs I see this in the bin dirs:
>
> lrwxrwxrwx 1 larrymartell larrymartell 7 Sep 27 11:21 python -> python3
> lrwxrwxrwx 1 larrymartell larrymartell 16 Sep 27 11:21 python3 ->
> /usr/bin/python3
....
> Not sure what this really means, nor how to get python to be in my venv.

WHy do you want python to be "in your venv"?

Re: path to python in venv

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: larry.ma...@gmail.com (Larry Martell)
Newsgroups: comp.lang.python
Subject: Re: path to python in venv
Date: Wed, 27 Sep 2023 12:46:06 -0700
Lines: 20
Message-ID: <mailman.358.1695844007.23016.python-list@python.org>
References: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
<mailman.356.1695840877.23016.python-list@python.org>
<slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>
<CACwCsY5BYi56Ji0HLxvQ5smHNaDiZ9zccN_YYecM=fug8Mb+hA@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de JK6qW2lrBDrTdfBd5JMqnAa0t2Kwjfx2Xf3V62oGqc9g==
Cancel-Lock: sha1:YPSx2JrSXwXpSBOP7O/96ZrdHSg= sha256:AlPkPIE1dE0GIn4TZhwWjAhw5GiED5aS3y7tvt7UyIY=
Return-Path: <larry.martell@gmail.com>
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=gmail.com header.i=@gmail.com header.b=ec97sAbL;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.017
X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:python': 0.06;
'2023': 0.07; '27,': 0.09; 'bin': 0.09; 'cc:addr:python-list':
0.09; 'cc:no real name:2**0': 0.14; '"in': 0.16; 'python3': 0.16;
'wrote:': 0.16; 'python': 0.16; 'cc:addr:python.org': 0.20;
'code': 0.23; 'cc:2**0': 0.25; "isn't": 0.27; 'python-list': 0.32;
'sep': 0.32; 'message-id:@mail.gmail.com': 0.32; 'but': 0.32;
'someone': 0.34; 'header:In-Reply-To:1': 0.34;
'received:google.com': 0.34; 'running': 0.34;
'from:addr:gmail.com': 0.35; 'really': 0.37; 'break': 0.39;
'wed,': 0.39; 'want': 0.40; 'your': 0.64; 'entire': 0.67; 'skip:/
10': 0.69; 'jon': 0.84; 'means,': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1695844004; x=1696448804; darn=python.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=OQ0oUX5v/JBjr23UYhBq0L6HeY05fl/AE0Gn0wYos5c=;
b=ec97sAbLKK3gUkKaUi0QB9fq/wVGwgsUp9noPMlGKN4Lvo+pBpA0efQwYYFSq//+21
m2OlAhPaTc22o75QXcYGuhoOvp9KbWYwZyFiZyy0Yem2Cy+2ZsXp5oKXUCEaIRl/pjHQ
liq1REKyaLsktgmgF91GyGMnR/WqlEjzdIcXI01oziaaf6OlLii3vZ+BmikxRWv0rw7l
LE3MJnFXiSQOrVKtgWsDZNz3dLsH5Ev/3l2st95gYu5ez9NoBIe5jMRe+BgaLbxRszLX
q699JZihskGj41GflVNU8l/ikDEOpRI+/n0QAq/EMPP4TklYYQeJ7iqZQFxNAbWbwdkI
rz1g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1695844004; x=1696448804;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=OQ0oUX5v/JBjr23UYhBq0L6HeY05fl/AE0Gn0wYos5c=;
b=YPkozUeaEDsz5kmlGd2E3nmtVn5vmzag4imna6nwKV5lJ/PH4c3ggC3wUH0kXVsDmM
NfMb5t2ZQWSEZ2sLWdlvv3OwYIMottxmJCMLQ2oZVXzOQ2ELSmKz8UPPHy69xt+WIyDV
uDfhpR/R7HVU2v6HD7ajF1xFLIjnJagCp/414KD15640qGpfwi++4wgHVFM8VcSPUN5y
Jg/avp7Ohh8lpjRvkDF7zh9ftABKaAgWu810/dXVok2rRrUifHUH3jP2slkkY6Tnf/zr
m0C5Mch2nW+SscKFwq5fxkWr3IGM0PAHrmilIY76B1LkCaTEPJbZa/o9ZaQowx8b5zgb
Fj6Q==
X-Gm-Message-State: AOJu0YxAHznmPbiwqefAUHRWF2GqqjBy2+43D34wz1QCle9XPc0FZ3nI
NlmHEzIqtovbNBmo+ZUfx4C2LzFxEgYEUhXHwlriMMearw==
X-Google-Smtp-Source: AGHT+IGA+JpE3+TSHFXXW1jXRzRY/9/9FFruO12U/clYbqNctkVoJkkWP9VZgj4ROveJTiVpud7Ta0Vj2EehoG4SeyI=
X-Received: by 2002:a05:6214:260c:b0:64a:3e9b:fa0a with SMTP id
gu12-20020a056214260c00b0064a3e9bfa0amr7895850qvb.11.1695844004268; Wed, 27
Sep 2023 12:46:44 -0700 (PDT)
In-Reply-To: <slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>
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: <CACwCsY5BYi56Ji0HLxvQ5smHNaDiZ9zccN_YYecM=fug8Mb+hA@mail.gmail.com>
X-Mailman-Original-References: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
<mailman.356.1695840877.23016.python-list@python.org>
<slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>
 by: Larry Martell - Wed, 27 Sep 2023 19:46 UTC

On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via Python-list
<python-list@python.org> wrote:
>
> On 2023-09-27, Larry Martell <larry.martell@gmail.com> wrote:
> > I was under the impression that in a venv the python used would be in
> > the venv's bin dir. But in my venvs I see this in the bin dirs:
> >
> > lrwxrwxrwx 1 larrymartell larrymartell 7 Sep 27 11:21 python -> python3
> > lrwxrwxrwx 1 larrymartell larrymartell 16 Sep 27 11:21 python3 ->
> > /usr/bin/python3
> ...
> > Not sure what this really means, nor how to get python to be in my venv..
>
> WHy do you want python to be "in your venv"?

Isn't that the entire point of a venv? To have a completely self
contained env? So if someone messes with the system python it will not
break code running in the venv.

RE: path to python in venv

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: niktarli...@zohomail.com (Niktar Lirik)
Newsgroups: comp.lang.python
Subject: RE: path to python in venv
Date: Wed, 27 Sep 2023 22:52:59 +0300
Lines: 37
Message-ID: <mailman.359.1695844389.23016.python-list@python.org>
References: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
<mailman.356.1695840877.23016.python-list@python.org>
<slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>
<CACwCsY5BYi56Ji0HLxvQ5smHNaDiZ9zccN_YYecM=fug8Mb+hA@mail.gmail.com>
<18ad833a3e3.4b7c7069535736904.1341861085186326507@zoho.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de hqlS0Zx8qW2LUD4qfAKfJAF84S4lZOKYlhcnat+HMWzQ==
Cancel-Lock: sha1:JYeFYEYh9cM85wI4NGFP1wnB15g= sha256:cm2krKw0IR3QG6gDMTJ4rvFhf4TFVvtox4CQm//+2j4=
Return-Path: <niktarlirik@zohomail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="1024-bit key; unprotected key"
header.d=zohomail.com header.i=niktarlirik@zohomail.com
header.b=PNLA6Pff; dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.007
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:python': 0.06;
'2023': 0.07; '27,': 0.09; 'bin': 0.09; 'cc:addr:python-list':
0.09; 'example:': 0.09; 'url-ip:13.107.213.67/32': 0.09; 'url-
ip:13.107.213/24': 0.09; 'url-ip:13.107.246.67/32': 0.09; 'url-
ip:13.107.246/24': 0.09; '&gt;': 0.14; 'url:mailman': 0.15; '"in':
0.16; '-&gt;': 0.16; 'python3': 0.16; 'received:136.143': 0.16;
'received:136.143.188': 0.16; 'received:zoho.com': 0.16; 'wrote:':
0.16; 'python': 0.16; 'cc:addr:python.org': 0.20; 'option': 0.20;
'code': 0.23; 'url-ip:188.166.95.178/32': 0.25; 'url-
ip:188.166.95/24': 0.25; 'url:listinfo': 0.25; 'cc:2**0': 0.25;
'url-ip:188.166/16': 0.25; "isn't": 0.27; 'url-ip:188/8': 0.31;
'python-list': 0.32; 'received:136': 0.32; 'sep': 0.32; 'but':
0.32; 'path': 0.33; 'someone': 0.34; 'header:In-Reply-To:1': 0.34;
'running': 0.34; 'really': 0.37; 'url-ip:13.107/16': 0.38;
'could': 0.38; 'break': 0.39; 'wed,': 0.39; 'want': 0.40; 'from:':
0.62; 'to:': 0.62; 're:': 0.64; 'your': 0.64; 'entire': 0.67;
'url-ip:104.18/16': 0.67; 'cc:': 0.69; 'skip:/ 10': 0.69;
'8bit%:33': 0.74; '8bit%:100': 0.76; 'sent:': 0.78; '8bit%:25':
0.80; 'jon': 0.84; 'means,': 0.84; 'skip:\xd1 10': 0.84
ARC-Seal: i=1; a=rsa-sha256; t=1695844379; cv=none;
d=zohomail.com; s=zohoarc;
b=l7fFMBvlz+edMjyj6qG5bgnssQiJ2kpr8OI+xxsqgNtCUbUYH3WLOJocp99aBM0lOvr9oKTZAv/x6XDjCAw08dnv1Zlw086UulQibJOSePaDi1jxN3PvRYIBgOOvXJ+68pVWKoY9cqVWlszvwjeahPsQz3UF2NbUXp20SGsz1r4=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
s=zohoarc; t=1695844379;
h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To;
bh=VBV1Xa5nW3x3r6Fcu/SZloN2y9KyzHeVSgI6d9K3DvU=;
b=hU7awIz3gzm2tVJTP1pgRwUkZHf2UYHPTRIGaiwoRGMIiWReDpme7O6SG4gp74yqBSJed1zgzkQvz/FOWFy3CDHL3IR7XKcThjWoWr+ZCeoCfucIlkJjt4YE6qoapLFQghf0VqjYKhgBZXQAwRgrTcSGKMmgZecxwX98rlKRKSs=
ARC-Authentication-Results: i=1; mx.zohomail.com;
dkim=pass header.i=zohomail.com;
spf=pass smtp.mailfrom=niktarlirik@zohomail.com;
dmarc=pass header.from=<niktarlirik@zohomail.com>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1695844379;
s=zm2022; d=zohomail.com; i=niktarlirik@zohomail.com;
h=MIME-Version:To:To:Cc:Cc:From:From:Message-ID:Subject:Subject:Date:Date:In-Reply-To:References:Content-Type:Feedback-ID:Message-Id:Reply-To;
bh=VBV1Xa5nW3x3r6Fcu/SZloN2y9KyzHeVSgI6d9K3DvU=;
b=PNLA6PffksWjPdeSipMIkd9md7O3p4M5MvK63pDZu5PJsR2dXTgqMID2q81XpKIX
Gtt0aQBn7yL+B5q/60g1Fy2opsEJW/qZfDOLNv/KkqFBsbJXHOxjVc1Vg2Y6ihzaNdN
9Gg8cGuq3MTMX5KUgKiOnU7+qrQbVxJzy/e9les0=
Importance: normal
X-Priority: 3
In-Reply-To: <CACwCsY5BYi56Ji0HLxvQ5smHNaDiZ9zccN_YYecM=fug8Mb+hA@mail.gmail.com>
Feedback-ID: rr08011227f1c78fbd813b5759256d42f8000066263e76de69cc69854de4b231136ab2f420a1baea1937fa5e:zu0801122720c7cad3f3c04c2af649f1610000d9bba161643b802ae0a4915f51af9f7550d091386201d15365:rf0801122b5616fa39f328cb8e6c6bb6db0000733404ba54420e58182fef7140ca000c9db2a728bb84a4b0a082a960a2:ZohoMail
X-ZohoMailClient: External
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
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: <18ad833a3e3.4b7c7069535736904.1341861085186326507@zoho.com>
X-Mailman-Original-References: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
<mailman.356.1695840877.23016.python-list@python.org>
<slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>
<CACwCsY5BYi56Ji0HLxvQ5smHNaDiZ9zccN_YYecM=fug8Mb+hA@mail.gmail.com>
 by: Niktar Lirik - Wed, 27 Sep 2023 19:52 UTC

Hi Larry,
You could just create venv with option '—copies'

For example:
python -m venv -–copies .venv

From: Larry Martell via Python-list
Sent: 27 сентября 2023 г. 22:48
To: Jon Ribbens
Cc: python-list@python.org
Subject: Re: path to python in venv

On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via Python-list
<python-list@python.org> wrote:
>
> On 2023-09-27, Larry Martell <larry.martell@gmail.com> wrote:
> > I was under the impression that in a venv the python used would be in
> > the venv's bin dir. But in my venvs I see this in the bin dirs:
> >
> > lrwxrwxrwx 1 larrymartell larrymartell 7 Sep 27 11:21 python -> python3
> > lrwxrwxrwx 1 larrymartell larrymartell 16 Sep 27 11:21 python3 ->
> > /usr/bin/python3
> ...
> > Not sure what this really means, nor how to get python to be in my venv..
>
> WHy do you want python to be "in your venv"?

Isn't that the entire point of a venv? To have a completely self
contained env? So if someone messes with the system python it will not
break code running in the venv.
--
https://mail.python.org/mailman/listinfo/python-list

Re: path to python in venv

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: larry.ma...@gmail.com (Larry Martell)
Newsgroups: comp.lang.python
Subject: Re: path to python in venv
Date: Wed, 27 Sep 2023 13:01:46 -0700
Lines: 67
Message-ID: <mailman.360.1695844945.23016.python-list@python.org>
References: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
<mailman.356.1695840877.23016.python-list@python.org>
<slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>
<CACwCsY5BYi56Ji0HLxvQ5smHNaDiZ9zccN_YYecM=fug8Mb+hA@mail.gmail.com>
<18ad833a3e3.4b7c7069535736904.1341861085186326507@zoho.com>
<CACwCsY4tp9CtyHtBbW6tJS2Lex-9VQnAK17yh6bDoCGPCNN70g@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de Je4aBz/LegP+vg/brXge/AW1yk3bTj/vb+nALU0LeebA==
Cancel-Lock: sha1:30HQYgVZT7sUVIG7XHa9S41dmeY= sha256:sefa54iP8tYz8LWS0LjH7tig6i0ZM3U7KPulMt6rX3I=
Return-Path: <larry.martell@gmail.com>
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=gmail.com header.i=@gmail.com header.b=MjxU/eRx;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.028
X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'subject:python': 0.06;
'2023': 0.07; '27,': 0.09; 'bin': 0.09; 'cc:addr:python-list':
0.09; 'example:': 0.09; 'url:mailman': 0.15; '"in': 0.16; 'for.':
0.16; 'python3': 0.16; 'wrote:': 0.16; 'python': 0.16;
'cc:addr:python.org': 0.20; 'option': 0.20; 'code': 0.23;
'cc:2**1': 0.23; 'thanks!': 0.24; 'url-ip:188.166.95.178/32':
0.25; 'url-ip:188.166.95/24': 0.25; 'url:listinfo': 0.25; 'url-
ip:188.166/16': 0.25; "isn't": 0.27; 'url-ip:188/8': 0.31;
'python-list': 0.32; 'sep': 0.32; 'message-id:@mail.gmail.com':
0.32; 'but': 0.32; 'path': 0.33; 'someone': 0.34; 'header:In-
Reply-To:1': 0.34; 'received:google.com': 0.34; 'running': 0.34;
'from:addr:gmail.com': 0.35; 'really': 0.37; 'could': 0.38;
'break': 0.39; 'wed,': 0.39; 'want': 0.40; 'from:': 0.62; 'to:':
0.62; 're:': 0.64; 'your': 0.64; 'entire': 0.67; 'cc:': 0.69;
'skip:/ 10': 0.69; '8bit%:100': 0.76; 'sent:': 0.78; 'jon': 0.84;
'means,': 0.84; 'skip:\xd1 10': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1695844943; x=1696449743; darn=python.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=4C6F2uCuNpXE6M2pBjwRGbFi3Z8insBcfsRCmXCDxao=;
b=MjxU/eRx4VF8JG/35uxTE/RzLxUHvfIh9tX8wZknA86+ZHJAMUHSjLlcY5oDKFZal3
Iff7xh4zqABFY2gx/c1G/T7+moKen8s0f09o7/Eyh/CW3kiqOQ7iz4wjWJj4TuVy07/K
0fuL0uaLUoiA8ILsIfX6fAIF6pfvOHnlcb7h4y3MMww6nuT080tTkuCaErlgJfrONb8S
Ec6lmHrgn2GmWzzH9tINAjRGNhVQ3lHLY7boy55NUa7grvNAwW4dV8JxIHq4GpdZ+RtW
y0B4QU+Qjy+388s2HV3wbhz4tiUuMiGH/dkQOXxTHqJKycLX28MdjoE4Kobg5rFL5gDD
ABfg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1695844943; x=1696449743;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=4C6F2uCuNpXE6M2pBjwRGbFi3Z8insBcfsRCmXCDxao=;
b=oIMugBb907auFT8vRnFRy7mDzhOKUwVsTCvS1Ck8Ui6CEL+LBjtjv343pIoQ0S7rvo
U9MZ1Ih+tDpPshySWFNSuBuaiuhkGfG/2GNZsQ+hnLBejsTp/b9tqOFIXEgrIV3o2znk
cj5Jd6ht+DnlDnFl7I7OEHu1rxtWyVfNEuec/Jjeya7+hpF2XaOzQ+K+kXQDjpJs3b7Q
QPoPYXVsKz5xJ+jw1aqf8VnqeIXKVFEsrtfHRAjdsKCcDkga+aoQiV/Lg7Zg3OHvzuxI
N99sxJl3Hv5HYditFWe4KccoTALnYUaS6oS28BB4IjVp3a0KhKA8hBnt/L14q6aKjaRT
ThEg==
X-Gm-Message-State: AOJu0YxT5qHovE3Mvcfae9pGtrrXmfjlXavNPS4Ug9rUWyBsEUAiEWPO
kPgP1zUZxRTZvE2dwji7CJnsIm2MzMhIPllEUg==
X-Google-Smtp-Source: AGHT+IHGnmzAZ5/GxS+GzYh+kf3xl3z5AYDBsuq0fYurLKNWqGTORugkIyAMvfldk0AIUCWNPJpcxrIJSf06+raA1Sg=
X-Received: by 2002:a67:f943:0:b0:44e:9351:e4f0 with SMTP id
u3-20020a67f943000000b0044e9351e4f0mr2425980vsq.22.1695844942849; Wed, 27 Sep
2023 13:02:22 -0700 (PDT)
In-Reply-To: <18ad833a3e3.4b7c7069535736904.1341861085186326507@zoho.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: <CACwCsY4tp9CtyHtBbW6tJS2Lex-9VQnAK17yh6bDoCGPCNN70g@mail.gmail.com>
X-Mailman-Original-References: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
<mailman.356.1695840877.23016.python-list@python.org>
<slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>
<CACwCsY5BYi56Ji0HLxvQ5smHNaDiZ9zccN_YYecM=fug8Mb+hA@mail.gmail.com>
<18ad833a3e3.4b7c7069535736904.1341861085186326507@zoho.com>
 by: Larry Martell - Wed, 27 Sep 2023 20:01 UTC

On Wed, Sep 27, 2023 at 12:53 PM Niktar Lirik <niktarlirik@zohomail..com> wrote:
>
> Hi Larry,
>
> You could just create venv with option '—copies'
>
>
>
> For example:
>
> python -m venv -–copies .venv

Thanks! That is just what I was looking for.

> From: Larry Martell via Python-list
> Sent: 27 сентября 2023 г. 22:48
> To: Jon Ribbens
> Cc: python-list@python.org
> Subject: Re: path to python in venv
>
>
>
> On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via Python-list
>
> <python-list@python.org> wrote:
>
> >
>
> > On 2023-09-27, Larry Martell <larry.martell@gmail.com> wrote:
>
> > > I was under the impression that in a venv the python used would be in
>
> > > the venv's bin dir. But in my venvs I see this in the bin dirs:
>
> > >
>
> > > lrwxrwxrwx 1 larrymartell larrymartell 7 Sep 27 11:21 python -> python3
>
> > > lrwxrwxrwx 1 larrymartell larrymartell 16 Sep 27 11:21 python3 ->
>
> > > /usr/bin/python3
>
> > ...
>
> > > Not sure what this really means, nor how to get python to be in my venv.
>
> >
>
> > WHy do you want python to be "in your venv"?
>
>
>
> Isn't that the entire point of a venv? To have a completely self
>
> contained env? So if someone messes with the system python it will not
>
> break code running in the venv.
>
> --
>
> https://mail.python.org/mailman/listinfo/python-list
>
>

Re: path to python in venv

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: mat...@wichmann.us (Mats Wichmann)
Newsgroups: comp.lang.python
Subject: Re: path to python in venv
Date: Wed, 27 Sep 2023 14:09:41 -0600
Lines: 36
Message-ID: <mailman.361.1695845391.23016.python-list@python.org>
References: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
<mailman.356.1695840877.23016.python-list@python.org>
<slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>
<CACwCsY5BYi56Ji0HLxvQ5smHNaDiZ9zccN_YYecM=fug8Mb+hA@mail.gmail.com>
<a08f5da0-4d62-b150-ea7f-a20fb7b48eef@wichmann.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de eJ2Tb7X1GsRQQxrzaK2MIg2J9ME/UfAICIuYw9iMKf5g==
Cancel-Lock: sha1:xBaiopgr4MVleNfR8Np/gWI1k9M= sha256:Wfi6eCvcgRvXlKy6EMUBE/EFPu8YH5XPlk4sk6d68jc=
Return-Path: <mats@wichmann.us>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="1024-bit key; unprotected key"
header.d=pobox.com header.i=@pobox.com header.b=ARC8KsPf;
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.046
X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'subject:python': 0.06;
'2023': 0.07; '27,': 0.09; 'bin': 0.09; 'dependencies': 0.09;
'received:173': 0.13; '"in': 0.16; 'command-line': 0.16;
'defaults': 0.16; 'modules,': 0.16; 'packages.': 0.16; 'python3':
0.16; 'turns': 0.16; 'virtualenv': 0.16; 'wrote:': 0.16; 'python':
0.16; 'to:addr:python-list': 0.20; 'creation': 0.22; 'version':
0.23; 'code': 0.23; "isn't": 0.27; '>>>': 0.28; 'header:User-
Agent:1': 0.30; 'python-list': 0.32; 'sep': 0.32; 'but': 0.32;
'someone': 0.34; 'header:In-Reply-To:1': 0.34; 'running': 0.34;
'those': 0.36; 'year': 0.36; 'really': 0.37; "it's": 0.37;
'received:192.168': 0.37; 'file': 0.38; 'break': 0.39; 'wed,':
0.39; 'appears': 0.40; 'want': 0.40; 'helps': 0.60; 'once': 0.63;
'your': 0.64; 'dedicated': 0.65; 'let': 0.66; 'time.': 0.66;
'entire': 0.67; 'that,': 0.67; 'skip:/ 10': 0.69; 'site': 0.70;
'deal': 0.73; 'easy': 0.74; 'disposable': 0.84; 'forgot': 0.84;
'jon': 0.84; 'means,': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=message-id
:date:mime-version:subject:to:references:from:in-reply-to
:content-type:content-transfer-encoding; s=sasl; bh=k2GhLBl55yaz
wPz8Stc6dBO3UQ7o7a+93ngKZ1p6vDY=; b=ARC8KsPfvwDuioDSzGjTia07paL4
NXQS6b6dd6HNFdlwNH+67w7dkPcAKgtT+JNtkY529Pq2gOCIQ8ihwmHsGO8W/8td
tTkaFZowB9Ji/N+mas5/ScuZt2PyH/cbJBeaas87pIvKI3dss/x0rml0bQqVai8D
ydOyQwvSLgMTPZg=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=wichmann.us;
h=message-id:date:mime-version:subject:to:references:from:in-reply-to:content-type:content-transfer-encoding;
s=2018-07.pbsmtp; bh=lb0MGqmx9ja46gd6MHf+r4jcDfitGJ0Uj+fAODtYZW8=;
b=FRsV4Pv8ou47EZS5v3KNq6FfofjmZI7MPZMnsenfDXXocoKcJjMcqAMFzBcyowdhB1H2tWb5Cij5cl4Ycok5gDrUjp0I0sA15Hg0XrCOdq9JYvs8fnW8VveRcfyY92j4qC3GQBiziMlkuhLkL8Ly1wPR0KiojjTkqii/xJoNTFg=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Content-Language: en-US
In-Reply-To: <CACwCsY5BYi56Ji0HLxvQ5smHNaDiZ9zccN_YYecM=fug8Mb+hA@mail.gmail.com>
X-Pobox-Relay-ID: CC361E2A-5D71-11EE-AB82-A19503B9AAD1-81526775!pb-smtp21.pobox.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: <a08f5da0-4d62-b150-ea7f-a20fb7b48eef@wichmann.us>
X-Mailman-Original-References: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
<mailman.356.1695840877.23016.python-list@python.org>
<slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>
<CACwCsY5BYi56Ji0HLxvQ5smHNaDiZ9zccN_YYecM=fug8Mb+hA@mail.gmail.com>
 by: Mats Wichmann - Wed, 27 Sep 2023 20:09 UTC

On 9/27/23 13:46, Larry Martell via Python-list wrote:
> On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via Python-list
> <python-list@python.org> wrote:
>>
>> On 2023-09-27, Larry Martell <larry.martell@gmail.com> wrote:
>>> I was under the impression that in a venv the python used would be in
>>> the venv's bin dir. But in my venvs I see this in the bin dirs:
>>>
>>> lrwxrwxrwx 1 larrymartell larrymartell 7 Sep 27 11:21 python -> python3
>>> lrwxrwxrwx 1 larrymartell larrymartell 16 Sep 27 11:21 python3 ->
>>> /usr/bin/python3
>> ...
>>> Not sure what this really means, nor how to get python to be in my venv.
>>
>> WHy do you want python to be "in your venv"?
>
> Isn't that the entire point of a venv? To have a completely self
> contained env? So if someone messes with the system python it will not
> break code running in the venv.

It can do that, it just turns out the defaults are to not make a
dedicated Python instance, and to not give access to the system site
packages. The venv and virtualenv modules, at least, will let you
override either of those defaults via command-line options at creation time.

Once a year I have virtualenvs break when the new Python version appears
in Fedora, which is irritating, but I take the attitude that virtualenvs
are disposable and (try to) not let it bother me that I forgot to deal
with that ahead of time. It helps if you make sure that a virtualenv
has a record of its dependencies - perhaps a requirements.txt file in
the project it's being used to build, so it's easy to recreate them.

Re: path to python in venv

<slrnuh94ap.78e.jon+usenet@raven.unequivocal.eu>

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jon+use...@unequivocal.eu (Jon Ribbens)
Newsgroups: comp.lang.python
Subject: Re: path to python in venv
Date: Wed, 27 Sep 2023 20:32:25 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <slrnuh94ap.78e.jon+usenet@raven.unequivocal.eu>
References: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
<mailman.356.1695840877.23016.python-list@python.org>
<slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>
<CACwCsY5BYi56Ji0HLxvQ5smHNaDiZ9zccN_YYecM=fug8Mb+hA@mail.gmail.com>
<mailman.358.1695844007.23016.python-list@python.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 27 Sep 2023 20:32:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="21d7de4ccc5decf14936e0997709aa2a";
logging-data="3449412"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ZePF2YKTvl4FiCWx2jYqtB2tLcbN6O+k="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:qnfZmLFFWVkyOU5kAeg0oAbmzQM=
 by: Jon Ribbens - Wed, 27 Sep 2023 20:32 UTC

On 2023-09-27, Larry Martell <larry.martell@gmail.com> wrote:
> On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via Python-list
><python-list@python.org> wrote:
>> On 2023-09-27, Larry Martell <larry.martell@gmail.com> wrote:
>> > I was under the impression that in a venv the python used would be in
>> > the venv's bin dir. But in my venvs I see this in the bin dirs:
>> >
>> > lrwxrwxrwx 1 larrymartell larrymartell 7 Sep 27 11:21 python -> python3
>> > lrwxrwxrwx 1 larrymartell larrymartell 16 Sep 27 11:21 python3 ->
>> > /usr/bin/python3
>> ...
>> > Not sure what this really means, nor how to get python to be in my venv.
>>
>> WHy do you want python to be "in your venv"?
>
> Isn't that the entire point of a venv? To have a completely self
> contained env? So if someone messes with the system python it will not
> break code running in the venv.

The main point of the venv is to isolate the installed packages,
rather than Python itself. I'm a bit surprised your symlinks are
as shown above though - mine link from python to python3.11 to
/usr/bin/python3.11, so it wouldn't change the version of python
used even if I installed a different system python version.

Re: path to python in venv

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: PythonL...@DancesWithMice.info (dn)
Newsgroups: comp.lang.python
Subject: Re: path to python in venv
Date: Thu, 28 Sep 2023 11:42:36 +1300
Organization: DWM
Lines: 75
Message-ID: <mailman.364.1695854571.23016.python-list@python.org>
References: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
<mailman.356.1695840877.23016.python-list@python.org>
<slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>
<CACwCsY5BYi56Ji0HLxvQ5smHNaDiZ9zccN_YYecM=fug8Mb+hA@mail.gmail.com>
<mailman.358.1695844007.23016.python-list@python.org>
<slrnuh94ap.78e.jon+usenet@raven.unequivocal.eu>
<b06e1bc1-7e26-437a-b73d-741edab40e1e@DancesWithMice.info>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de 7oWIYv1Fde2HiSEbDbZ5JA2JBxRHQ2LSJfcGCUk+WMLA==
Cancel-Lock: sha1:OY6LAq9+gD7R2U62AiNWrm/LTOE= sha256:Fq7mPXQitIXeLSKWHdRX/lMndZsutkJGgQ1uHiz/nMI=
Return-Path: <PythonList@DancesWithMice.info>
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=danceswithmice.info header.i=@danceswithmice.info
header.b=FLJvZk30; dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.005
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'poster': 0.03; '(which':
0.04; 'pycharm': 0.04; 'subject:python': 0.06; '2023': 0.07;
'27,': 0.09; '=dn': 0.09; 'bin': 0.09;
'from:addr:danceswithmice.info': 0.09; 'from:addr:pythonlist':
0.09; 'received:192.168.1.64': 0.09; 'url-ip:151.101.0.223/32':
0.09; 'url-ip:151.101.128.223/32': 0.09; 'url-
ip:151.101.192.223/32': 0.09; 'url-ip:151.101.64.223/32': 0.09;
'url:pycharm': 0.09; 'url-ip:140/8': 0.15; '"in': 0.16; '>>>>':
0.16; 'automating': 0.16; 'boring': 0.16; 'dated': 0.16;
'interpreter': 0.16; 'jetbrains': 0.16; 'machine,': 0.16;
'message-id:@DancesWithMice.info': 0.16; 'packages,': 0.16;
'python3': 0.16; 'recall': 0.16; 'received:cloud': 0.16;
'received:rangi.cloud': 0.16; 'treats': 0.16; 'url-
ip:152.19.134/24': 0.16; 'url-ip:152.19/16': 0.16; 'url-
ip:8.43.85/24': 0.16; 'url-ip:8.43/16': 0.16; 'url:jetbrains':
0.16; 'url:peps': 0.16; 'url:tech': 0.16; 'wrote:': 0.16;
'python': 0.16; 'proposals': 0.19; 'to:addr:python-list': 0.20;
'creation': 0.22; '\xe2\x80\x94': 0.22; 'version': 0.23; 'code':
0.23; 'installed': 0.23; '(and': 0.25; 'creating': 0.27; "isn't":
0.27; 'local': 0.27; 'bit': 0.27; '>>>': 0.28; 'version.': 0.28;
'header:User-Agent:1': 0.30; '8bit%:19': 0.31; 'packages': 0.31;
'module': 0.31; 'header:Organization:1': 0.31; 'official': 0.32;
'python-list': 0.32; 'sep': 0.32; "wouldn't": 0.32;
'received:192.168.1': 0.32; 'but': 0.32; "i'm": 0.33; 'there':
0.33; 'someone': 0.34; "didn't": 0.34; 'sponsor': 0.34; 'header
:In-Reply-To:1': 0.34; 'running': 0.34; 'url:)': 0.35; 'change':
0.36; 'currently': 0.37; 'main': 0.37; 'really': 0.37; 'using':
0.37; 'received:192.168': 0.37; 'though': 0.37; '8bit%:14': 0.38;
'single': 0.39; 'use': 0.39; 'break': 0.39; 'wed,': 0.39; 'both':
0.40; 'something': 0.40; 'want': 0.40; "there's": 0.61; 'above':
0.62; 'url-ip:151.101.0/24': 0.62; 'url-ip:151.101.128/24': 0.62;
'url-ip:151.101.192/24': 0.62; 'url-ip:151.101.64/24': 0.62;
'our': 0.64; 'with:': 0.64; 'your': 0.64; 'upon': 0.64;
'independent': 0.65; 'years': 0.65; 'decided': 0.67; 'entire':
0.67; 'primary': 0.67; 'url-ip:3/8': 0.67; 'url-ip:67/8': 0.69;
'fyi': 0.69; 'skip:/ 10': 0.69; 'site': 0.70; 'older': 0.70;
'interesting': 0.71; 'offer': 0.71; 'virtual': 0.71; 'major':
0.78; 'combinations': 0.84; 'conducted': 0.84; 'interpreters':
0.84; 'itself.': 0.84; 'jon': 0.84; 'lightweight': 0.84; 'means,':
0.84; 'notably': 0.84; 'proving': 0.84; 'surprised': 0.84;
'url:languages': 0.84; '\xc2\xabthe': 0.84; 'articles': 0.86;
'skip:d 30': 0.86; 'disclaimer:': 0.88
DKIM-Filter: OpenDKIM Filter v2.11.0 vps.rangi.cloud 52BA73C55
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=danceswithmice.info;
s=staff; t=1695854562;
bh=HlLf/V7Rn2mOa3USOkANrpNKY58ZjDd28t0JNW3YlG8=;
h=Date:Subject:To:References:From:In-Reply-To:From;
b=FLJvZk30LSu3pYX5MsoF2PXfp43wG3aoEldYjf+sJy3i56lkq3STbpEQXqqQXrWjK
L2ckWU3GM5SK++DzdufOVQriJUr1dGvCptju28Jm/DSTN4qLKkRghQXVpTrLU2oMHm
PvUvP/ejZsnnzJME1cRiw26z2m7nCpLcZNMzudR50rYtbqln8JPunNi9mGpOVrw6Hg
iKzKGMOPHl5epbw/GwDtFL5FIy7SgOw7UUbQMf4dyjkL/baWg6dEt/1kiJJ9MnaurF
evpg5qcSNlNm7AxvaSe9vQ9e+oPlzIfiVDnGruSyfZ4f3p7d3UXwRTyeUgprYq9l1c
UsChBG76/XWPA==
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <slrnuh94ap.78e.jon+usenet@raven.unequivocal.eu>
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: <b06e1bc1-7e26-437a-b73d-741edab40e1e@DancesWithMice.info>
X-Mailman-Original-References: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
<mailman.356.1695840877.23016.python-list@python.org>
<slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>
<CACwCsY5BYi56Ji0HLxvQ5smHNaDiZ9zccN_YYecM=fug8Mb+hA@mail.gmail.com>
<mailman.358.1695844007.23016.python-list@python.org>
<slrnuh94ap.78e.jon+usenet@raven.unequivocal.eu>
 by: dn - Wed, 27 Sep 2023 22:42 UTC

On 28/09/2023 09.32, Jon Ribbens via Python-list wrote:
> On 2023-09-27, Larry Martell <larry.martell@gmail.com> wrote:
>> On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via Python-list
>> <python-list@python.org> wrote:
>>> On 2023-09-27, Larry Martell <larry.martell@gmail.com> wrote:
>>>> I was under the impression that in a venv the python used would be in
>>>> the venv's bin dir. But in my venvs I see this in the bin dirs:
>>>>
>>>> lrwxrwxrwx 1 larrymartell larrymartell 7 Sep 27 11:21 python -> python3
>>>> lrwxrwxrwx 1 larrymartell larrymartell 16 Sep 27 11:21 python3 ->
>>>> /usr/bin/python3
>>> ...
>>>> Not sure what this really means, nor how to get python to be in my venv.
>>>
>>> WHy do you want python to be "in your venv"?
>>
>> Isn't that the entire point of a venv? To have a completely self
>> contained env? So if someone messes with the system python it will not
>> break code running in the venv.
>
> The main point of the venv is to isolate the installed packages,
> rather than Python itself. I'm a bit surprised your symlinks are
> as shown above though - mine link from python to python3.11 to
> /usr/bin/python3.11, so it wouldn't change the version of python
> used even if I installed a different system python version.

"venv — Creation of virtual environments"
(https://docs.python.org/3/library/venv.html) starts by saying:

«The venv module supports creating lightweight “virtual environments”,
each with their own independent set of Python packages installed in
their site directories.»

but later expands this with: «Used to contain a specific Python
interpreter...» even though the primary use-case treats the system
interpreter as the "base" Python/environment.

Time for some reading and proving appropriate combinations of options?

Over the years there have been various proposals to enable multiple
versions of Python to exist concurrently on a single machine, notably
Python2 + Python3 - but am failing to recall any official docs on
Python3.n + Python3.m; eg "PEP 554 – Multiple Interpreters in the
Stdlib" (https://peps.python.org/pep-0554/).

That said there's plenty of articles on-line (which may/not feature
venv*) such as "Multiple Python interpreters"
(https://developer.fedoraproject.org/tech/languages/python/multiple-pythons.html)

* although the OP didn't mention an OpSys, one poster did mention
Fedora-Linux...

NB some of this info may be dated - it is some time since conducted this
investigation (and decided not to use venv - apologies!)

Am currently using PyCharm (courtesy of recent teams' conventions) and
it eases both problems (which interpreter, and which
development-environment/activation steps) but in automating 'the boring
stuff' it will be interesting to see if in-future, I notice when the
project is based upon an older system!
FYI
https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-reloading-interpreter-paths.html
(I'd be surprised if the other major tool-sets don't offer something
similar)

Disclaimer: JetBrains sponsor our local PUG-meetings with a door-prize.

--
--
Regards,
=dn

Re: path to python in venv

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: hjp-pyt...@hjp.at (Peter J. Holzer)
Newsgroups: comp.lang.python
Subject: Re: path to python in venv
Date: Thu, 28 Sep 2023 00:51:45 +0200
Lines: 65
Message-ID: <mailman.365.1695855475.23016.python-list@python.org>
References: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
<mailman.356.1695840877.23016.python-list@python.org>
<slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>
<CACwCsY5BYi56Ji0HLxvQ5smHNaDiZ9zccN_YYecM=fug8Mb+hA@mail.gmail.com>
<mailman.358.1695844007.23016.python-list@python.org>
<slrnuh94ap.78e.jon+usenet@raven.unequivocal.eu>
<20230927225145.fq7x57fithelvx4k@hjp.at>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="byv7avqenyxxavyz"
X-Trace: news.uni-berlin.de eHQQFz9IUG7YrZSNiYKa8A/yclEi6JwxQKTTYEypuaXw==
Cancel-Lock: sha1:dFXLKpM1uzB8aaHnvl1NFmIqvKU= sha256:lsclezoQp73R29yoF5TUeouqCe8asHN7re/47NGL1UU=
Return-Path: <hjp-python@hjp.at>
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.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '2022': 0.05; 'content-
type:multipart/signed': 0.05; 'subject:python': 0.06; '2023':
0.07; 'aug': 0.07; '27,': 0.09; 'content-type:application/pgp-
signature': 0.09; 'filename:fname piece:asc': 0.09;
'filename:fname piece:signature': 0.09;
'filename:fname:signature.asc': 0.09; '"creative': 0.16; '__/':
0.16; 'challenge!"': 0.16; 'from:addr:hjp-python': 0.16;
'from:addr:hjp.at': 0.16; 'from:name:peter j. holzer': 0.16;
'hjp@hjp.at': 0.16; 'holzer': 0.16; 'python3': 0.16; 'reality.':
0.16; 'stross,': 0.16; 'url-ip:212.17.106/24': 0.16; 'url-
ip:212.17/16': 0.16; 'url:hjp': 0.16; '|_|_)': 0.16; 'wrote:':
0.16; 'python': 0.16; 'probably': 0.17; 'to:addr:python-list':
0.20; 'version': 0.23; 'command': 0.23; 'installed': 0.23; 'bit':
0.27; 'sense': 0.28; 'version.': 0.28; 'python-list': 0.32; 'sep':
0.32; "wouldn't": 0.32; "i'm": 0.33; 'header:In-Reply-To:1': 0.34;
'change': 0.36; 'though': 0.37; 'wed,': 0.39; 'above': 0.62;
'received:212': 0.62; 'your': 0.64; 'received:userid': 0.66;
'it:': 0.69; 'skip:/ 10': 0.69; 'url-ip:212/8': 0.69; 'points':
0.84; 'jon': 0.84; 'received:at': 0.84; 'surprised': 0.84
Mail-Followup-To: python-list@python.org
Content-Disposition: inline
In-Reply-To: <slrnuh94ap.78e.jon+usenet@raven.unequivocal.eu>
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: <20230927225145.fq7x57fithelvx4k@hjp.at>
X-Mailman-Original-References: <CACwCsY4E_4gL+=8i2=fnKwpp_P8PtKFYVsDOUKBcB-d66qG8_A@mail.gmail.com>
<mailman.356.1695840877.23016.python-list@python.org>
<slrnuh8un7.78e.jon+usenet@raven.unequivocal.eu>
<CACwCsY5BYi56Ji0HLxvQ5smHNaDiZ9zccN_YYecM=fug8Mb+hA@mail.gmail.com>
<mailman.358.1695844007.23016.python-list@python.org>
<slrnuh94ap.78e.jon+usenet@raven.unequivocal.eu>
 by: Peter J. Holzer - Wed, 27 Sep 2023 22:51 UTC
Attachments: signature.asc (application/pgp-signature)

On 2023-09-27 20:32:25 -0000, Jon Ribbens via Python-list wrote:
> On 2023-09-27, Larry Martell <larry.martell@gmail.com> wrote:
> > On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via Python-list<python-list@python.org> wrote:
> >> On 2023-09-27, Larry Martell <larry.martell@gmail.com> wrote:
> >> > lrwxrwxrwx 1 larrymartell larrymartell 7 Sep 27 11:21 python -> python3
> >> > lrwxrwxrwx 1 larrymartell larrymartell 16 Sep 27 11:21 python3 -> /usr/bin/python3
[...]
> I'm a bit surprised your symlinks are as shown above though - mine
> link from python to python3.11 to /usr/bin/python3.11, so it wouldn't
> change the version of python used even if I installed a different
> system python version.

That's probably because you created the venvs with "python3.11 -m venv ...".
The symlink points to the command you used to create it:

% python3 -m venv venv
% ll venv/bin/python*
lrwxrwxrwx 1 hjp hjp 7 Aug 29 2022 venv/bin/python -> python3*
lrwxrwxrwx 1 hjp hjp 12 Aug 29 2022 venv/bin/python3 -> /bin/python3*
lrwxrwxrwx 1 hjp hjp 7 Aug 29 2022 venv/bin/python3.10 -> python3*

% python3.10 -m venv venv
% ll venv/bin/python*
lrwxrwxrwx 1 hjp hjp 10 Sep 28 00:45 venv/bin/python -> python3.10*
lrwxrwxrwx 1 hjp hjp 10 Sep 28 00:45 venv/bin/python3 -> python3.10*
lrwxrwxrwx 1 hjp hjp 15 Sep 28 00:45 venv/bin/python3.10 -> /bin/python3.10*

hp

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

Attachments: signature.asc (application/pgp-signature)
1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor