Path: csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod From: Jorge Moraleda Newsgroups: linux.debian.maint.python Subject: Re: #!/usr/bin/python3 vs virtualenv Date: Fri, 03 Mar 2023 21:30:01 +0100 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Fri Mar 3 20:29:42 2023 Old-Return-Path: X-Amavis-Spam-Status: No, score=-3.699 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, BODY_8BITS=1.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=2, LDO_WHITELIST=-5, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no autolearn_force=no X-Policyd-Weight: using cached result; rate: -5.5 X-Gm-Message-State: AO0yUKVYQyPx6c638ZQuSRq8E8T5gfFeg0Umo+1mGQgl6obadxMz6iQU /lHo0cuIuFh2RFnWjP4KEZXw/fS4rXlsfuq6YKJvOILHQdw= X-Google-SMTP-Source: AK7set8bf3pkc3x5wTcejcRJ7sd8wHMTA4+9Fy8lscm12uqPoimoxEJ/TPjlMX1BiBDG4LEF51c/UTuiYX0iWXk0LZA= X-Received: by 2002:a17:902:e5cc:b0:19d:1dfe:eac6 with SMTP id u12-20020a170902e5cc00b0019d1dfeeac6mr1303252plf.1.1677875360059; Fri, 03 Mar 2023 12:29:20 -0800 (PST) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d057a905f604cc1e" X-Mailing-List: archive/latest/20864 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/CAGbhV701u4XtjAYxrGH8TrfQw_rFzRKy5vV+o==7uTy=Yr7JLA@mail.gmail.com Approved: robomod@news.nic.it Lines: 70 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: debian-python@lists.debian.org X-Original-Date: Fri, 3 Mar 2023 15:29:09 -0500 X-Original-Message-ID: X-Original-References: <1c48b573-b3cd-0eb8-4493-752dd9d0c3fa@inria.fr> <9193D789-A0A4-4883-B2AC-3CBFF1ED3444@ubuntu.com> <20230303191648.zhsf7b5bukvwcgmh@yuggoth.org> Xref: csiph.com linux.debian.maint.python:14962 --000000000000d057a905f604cc1e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Would it be hard to support both philosophies? I would like to suggest a couple of configuration options that by default disallow using pip outside a virtual environment but that users with root privilege can modify by editing a config file (probably somewhere in /etc) and that would enable using pip outside a virtual environment, both as root and as regular user respectively. I feel this would satisfy the needs of regular users to be protected against accidentally breaking their system while enabling power users to have full control of their computer and enjoy the simplicity of a single environment. Clearly this discussion suggests that debian has both types of users and we should support them both if we can. Thank you. On Fri, Mar 3, 2023 at 2:17=E2=80=AFPM Jeremy Stanley w= rote: > On 2023-03-03 18:44:19 +0000 (+0000), Danial Behzadi =D8=AF=D8=A7=D9=86= =DB=8C=D8=A7=D9=84 =D8=A8=D9=87=D8=B2=D8=A7=D8=AF=DB=8C wrote: > > You just want to install sphinx via pip in the virtual environment > > too. Each venv should be atomic and isolated which means not > > depended to system packages. > > However a venv can be made to use system packages if you use the > --system-site-packages option when creating it. > -- > Jeremy Stanley > --000000000000d057a905f604cc1e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Wou= ld it be hard to support both philosophies?

I would like to suggest= a couple of configuration options that by default disallow using pip outsi= de a virtual environment but that users with root privilege can modify by e= diting a config file (probably somewhere in /etc) and that would enable usi= ng pip outside a virtual environment, both as root and as regular user resp= ectively.

I feel this would satisfy the needs of regular users to be protected aga= inst accidentally breaking their system while enabling power users to have = full control of their computer and enjoy the simplicity of a single environ= ment. Clearly this discussion suggests that debian has both types of users = and we should support them both if we can.

Thank you.

On Fri, Mar 3, 2023 at 2:17=E2=80= =AFPM Jeremy Stanley <fungi@yuggoth= .org> wrote:
On 2023-03-03 18:44:19 +0000 (+0000), Danial Behzadi =D8=AF=D8=A7=D9=86= =DB=8C=D8=A7=D9=84 =D8=A8=D9=87=D8=B2=D8=A7=D8=AF=DB=8C wrote:
> You just want to install sphinx via pip in the virtual environment
> too. Each venv should be atomic and isolated which means not
> depended to system packages.

However a venv can be made to use system packages if you use the
--system-site-packages option when creating it.
--
Jeremy Stanley
--000000000000d057a905f604cc1e--