Python and Ubuntu versions

Chris Angelico rosuav at gmail.com
Fri Jul 23 19:22:04 EDT 2021


On Sat, Jul 24, 2021 at 9:03 AM Cameron Simpson <cs at cskk.id.au> wrote:
>
> On 23Jul2021 19:51, Chris Angelico <rosuav at gmail.com> wrote:
> >On Fri, Jul 23, 2021 at 7:48 PM Cameron Simpson <cs at cskk.id.au> wrote:
> >> Do the build and install as yourself. I usually do the install step by
> >> making the install directory as root, then chowning it to me. Then you
> >> can do the install as you - this has the advantage the you're
> >> unprivileged and can't accidentally damage the OS install.
> >
> >That's interesting, in that it leaves you vulnerable to accidentally
> >damaging your alternate installation, but you're putting it into a
> >directory that normally would look privileged. I'd be inclined to
> >leave /usr as a privileged directory, and do this sort of installation
> >entirely within ~/bin or something equivalent. But hey, this is the
> >flexibility of Unix file system permissions!
>
> 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).

> 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.

ChrisA


More information about the Python-list mailing list