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.
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"?
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"?
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
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.
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.
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.
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.
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.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 10:58:11 |
Calls: | 10,387 |
Calls today: | 2 |
Files: | 14,060 |
Messages: | 6,416,692 |