Python and Ubuntu versions

Chris Angelico rosuav at gmail.com
Fri Jul 23 19:58:15 EDT 2021


On Sat, Jul 24, 2021 at 9:52 AM Cameron Simpson <cs at cskk.id.au> wrote:
>
> On 24Jul2021 09:22, Chris Angelico <rosuav at gmail.com> wrote:
> >On Sat, Jul 24, 2021 at 9:03 AM Cameron Simpson <cs at cskk.id.au> wrote:
> >> Rereading this, maybe I was unclear. This is for install directories
> >> like /opt/Python-3.whatever or /usr/local/python-3.whatever. Create the
> >> install point, chown, install as yourself.
> >>
> >> I agree about the risk of future mangling - there's a good case for
> >> chowning it all to root _after_ the install. I'm just trying to do the
> >> install itself in an unprivileged mode.
> >
> >Ah, I see what you mean. In that case, it's probably fine, but I'd
> >just take the simpler approach and "sudo make install" (or altinstall
> >as the case may be).
>
> Ah, but to me this is the moral equivalent of:
>
>     wget random-install-script-url | sh

Ehhh, it's not nearly that bad. The biggest risk with the wget command
is that, even if you fully trust the source, all it takes is one small
network issue and you're running a half a script.

> Ideally I'd be doing the install, and arguably the build, as a third
> user, neither root (keep the system intact) nor myself (my data! mine!
> don't you touch it!)

Oh, definitely the build is done as a non-root user. (I usually do
that as my own user for simplicity, though.) And while I can see the
benefits to installing as a dedicated separate user, it's also just
way too fiddly, so I just sudo it and do things the easy way :)

(That is, assuming I'm installing into /usr. If it's installed outside
of those sorts of directories, then root won't be involved at all -
for instance, if I'm developing OBS Studio, I'll build it into
~/tmp/obs/bin and its friends, and it'll all be done as my own user.)

> >> Probably for the OP, the simplest way is a local install as themselved,
> >> eg in ~/opt/python-3.whatever. Not rootneed needed at all, and a few
> >> symlinks in ~/bin (or adding ~/opt/python-3.whatever/bin to $PATH) are
> >> all that's needed to make use of it.
> >
> >Yeah, exactly.
>
> Aye.
>
> But they seemed to be on the route of installing over the system Python,
> and I was trying to talk them down to just a "system wide but off to the
> side" install.
>

Fair enough. And I absolutely agree with NOT installing over the
system Python, although that's usually not going to happen anyway
(since this is a different minor version).

ChrisA


More information about the Python-list mailing list