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


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

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

From Jeremy Stanley <fungi@yuggoth.org>
Newsgroups linux.debian.maint.python
Subject Re: #!/usr/bin/python3 vs virtualenv
Date 2023-03-03 22:50 +0100
Message-ID <G5lrP-9RU6-1@gated-at.bofh.it> (permalink)
References (1 earlier) <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> <G5l8t-9RNG-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

On 2023-03-03 16:22:11 -0500 (-0500), Jorge Moraleda wrote:
> 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).
[...]

They come from a reading of the pip documentation and associated
PEP-668 specification respectively. I do hope power users read
documentation before they choose to break their systems.

Be aware that the second approach I mentioned is removing a file
which gets installed by the libpython3.11-stdlib package, so will
end up getting replaced each time you upgrade that package as it's
not a conffile. It's a reasonable approach for things like container
base images where subsequent image build steps use pip to install
packages into the container, but it would be annoying for a "normal"
system where you upgrade packages without building entirely new
images.

The pip install command-line option is more of a user-facing escape
hatch, since it's clearly worded to let you know that it can quite
easily render existing Python applications inoperable if you choose
to install things into user or system site directories with pip.
-- 
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