Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #14967

Re: #!/usr/bin/python3 vs virtualenv

Path csiph.com!fu-berlin.de!news.servidellagleba.it!bofh.it!news.nic.it!robomod
From Jorge Moraleda <jorge.moraleda@gmail.com>
Newsgroups linux.debian.maint.python
Subject Re: #!/usr/bin/python3 vs virtualenv
Date Fri, 03 Mar 2023 22:30:01 +0100
Message-ID <G5l8t-9RNG-5@gated-at.bofh.it> (permalink)
References <G5fw5-9OsW-3@gated-at.bofh.it> <G5iDD-9Qef-1@gated-at.bofh.it> <G5j6F-9QDs-5@gated-at.bofh.it> <G5kcp-9ReX-3@gated-at.bofh.it> <G5kvM-9Rly-7@gated-at.bofh.it>
X-Mailbox-Line From debian-python-request@lists.debian.org Fri Mar 3 21:22:46 2023
Old-Return-Path <jorge.moraleda@gmail.com>
X-Amavis-Spam-Status No, score=-5.099 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FOURLA=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 AO0yUKW+UPxA1nt31aGLrCid/EXPMpMryepGX0KKLQgOPpPAJHzdKdtC rB2g35GGQCR2oqfX6QEIhUmVSa+X3yOHtNkMm9v5EkcpMSKVDg==
X-Google-SMTP-Source AK7set/F7btv/oZI8GOvyknhg+y1HZiXxPDMMGdSGkd/y42/boXTAdi08OpRnNhw96RQ2WfhVvSAVh6vKKAKvsiGTfo=
X-Received by 2002:a17:902:efcf:b0:19c:3296:ecdc with SMTP id ja15-20020a170902efcf00b0019c3296ecdcmr1225724plb.1.1677878542339; Fri, 03 Mar 2023 13:22:22 -0800 (PST)
MIME-Version 1.0
Content-Type multipart/alternative; boundary="0000000000007e122e05f6058ab4"
X-Mailing-List <debian-python@lists.debian.org> archive/latest/20870
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/CAGbhV73e7rhMEnEQqhdwJixL2-2p6h04oumrYmDi4Z8mXXfTsQ@mail.gmail.com
Approved robomod@news.nic.it
Lines 132
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 16:22:11 -0500
X-Original-Message-ID <CAGbhV73e7rhMEnEQqhdwJixL2-2p6h04oumrYmDi4Z8mXXfTsQ@mail.gmail.com>
X-Original-References <1c48b573-b3cd-0eb8-4493-752dd9d0c3fa@inria.fr> <9193D789-A0A4-4883-B2AC-3CBFF1ED3444@ubuntu.com> <20230303191648.zhsf7b5bukvwcgmh@yuggoth.org> <CAGbhV701u4XtjAYxrGH8TrfQw_rFzRKy5vV+o==7uTy=Yr7JLA@mail.gmail.com> <20230303204314.f663ltpcjhg3iyzt@yuggoth.org>
Xref csiph.com linux.debian.maint.python:14967

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Jeremy, Thank you for your quick reply!

I did not know about `sudo pip install --break-system-packages foo` or
`sudo rm /usr/lib/python3.11/EXTERNALLY-MANAGED` (Frankly I only knew about
this issue what I have read on this discussion). This is very helpful and
it really changes my outlook on this topic.

IMHO the existence of these options completely satisfies the requirements
of advanced users. In particular because, if I understand it correctly, the
second of these options would leave the configuration as it used to be in
previous releases of debian for those who want that.

So then, for those that raised the issue, were you aware of these
approaches? Will either of them satisfy your requirements? And if not,
could you elaborate further on why not?

Thank you again.

On Fri, Mar 3, 2023 at 3:43 PM Jeremy Stanley <fungi@yuggoth.org> wrote:

> On 2023-03-03 15:29:09 -0500 (-0500), Jorge Moraleda wrote:
> > 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.
> [...]
>
> "Power users" who like to break their systems can simply `sudo pip
> install --break-system-packages foo` or even just `sudo rm
> /usr/lib/python3.11/EXTERNALLY-MANAGED` and then do whatever they
> want anyway. It doesn't seem to me like there's much need for a
> config option that does that for you, and adding one would imply
> that Debian will help you fix things once you've done it. This
> feature is simply a guard rail for users who otherwise wouldn't know
> where the edge of that cliff is located.
>
> There are already solutions for your power users, but as is often
> said in such situations: If it breaks you get to keep the pieces.
> Have fun!
> --
> Jeremy Stanley
>

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

#!/usr/bin/python3 vs virtualenv Marc Glisse <marc.glisse@inria.fr> - 2023-03-03 16:30 +0100
  Re: #!/usr/bin/python3 vs virtualenv Danial Behzadi دانیال بهزادی <dani.behzi@ubuntu.com> - 2023-03-03 19:50 +0100
    Re: #!/usr/bin/python3 vs virtualenv Jeremy Stanley <fungi@yuggoth.org> - 2023-03-03 20:20 +0100
      Re: #!/usr/bin/python3 vs virtualenv Jorge Moraleda <jorge.moraleda@gmail.com> - 2023-03-03 21:30 +0100
        Re: #!/usr/bin/python3 vs virtualenv Jeremy Stanley <fungi@yuggoth.org> - 2023-03-03 21:50 +0100
          Re: #!/usr/bin/python3 vs virtualenv Jorge Moraleda <jorge.moraleda@gmail.com> - 2023-03-03 22:30 +0100
            Re: #!/usr/bin/python3 vs virtualenv Jeremy Stanley <fungi@yuggoth.org> - 2023-03-03 22:50 +0100
            Re: #!/usr/bin/python3 vs virtualenv Julian Gilbey <julian@d-and-j.net> - 2023-03-05 11:50 +0100
              Re: #!/usr/bin/python3 vs virtualenv Jorge Moraleda <jorge.moraleda@gmail.com> - 2023-03-05 13:00 +0100
              Re: #!/usr/bin/python3 vs virtualenv Stefano Rivera <stefanor@debian.org> - 2023-03-09 23:40 +0100
    Re: #!/usr/bin/python3 vs virtualenv Marc Glisse <marc.glisse@inria.fr> - 2023-03-05 14:20 +0100
  Re: #!/usr/bin/python3 vs virtualenv Dmitry Shachnev <mitya57@debian.org> - 2023-03-03 21:50 +0100

csiph-web