News for hackers. Stuff that matters.
Re:YouTube-Dl Hosting Ban Paves the Way to Privatized Censor... by blueflow on Thursday April 13, 2023 @08:17AM (#35554255)
I think if you have python installed but no 'python' executable in PATH, your install is broken.
Re:YouTube-Dl Hosting Ban Paves the Way to Privatized Censor... by noselasd on Thursday April 13, 2023 @08:28AM (#35554359)
That depends on who "you" are. Linux distros these days tend to ship modern python package with a python3 executable, no python executable. Many distros still support a python2 package, some install that as a python exeutable, some as a python2 executable.

iirc. homebrew on OSX installs python as a python3 executable, no python exeutable.

Hopefully no-one should support python v2 in 2023 ?

Re:YouTube-Dl Hosting Ban Paves the Way to Privatized Censor... by acidburnNSA on Thursday April 13, 2023 @08:40AM (#35554481)
Yup. For example, debian based distro users need to install this [1] to make python be python 3.

[1] https://packages.debian.org/bullseye/python-is-python3

Re:YouTube-Dl Hosting Ban Paves the Way to Privatized Censor... by capableweb on Thursday April 13, 2023 @08:45AM (#35554536)
AFAIK, at least Arch symlinks python to be python3

    $ file /usr/bin/python
    /usr/bin/python: symbolic link to python3
I think this is by default, I don't remember doing anything special in my setup. `python2` exists for packages still needing python 2.7 et al.
Re:YouTube-Dl Hosting Ban Paves the Way to Privatized Censor... by yrro on Thursday April 13, 2023 @09:16AM (#35554943)
Arch doing this is what fucked it up for everyone else!
Re:YouTube-Dl Hosting Ban Paves the Way to Privatized Censor... by capableweb on Thursday April 13, 2023 @09:55AM (#35555505)
Hah, sorry? If you don't use, you shouldn't be impacted by the decisions Arch does :) Unless I'm missing that you were joking.
Re:YouTube-Dl Hosting Ban Paves the Way to Privatized Censor... by kweingar on Thursday April 13, 2023 @10:13AM (#35555759)
There are people who write programs on Arch that use the python3 -> python symlink.

Then when that program is packaged for other distros, you get this error.

Not a huge deal by any means, but the non-standard behavior can add a bit of friction.

Re:YouTube-Dl Hosting Ban Paves the Way to Privatized Censor... by phatfish on Thursday April 13, 2023 @10:14AM (#35555771)
Fedora does the same. Must have been 3 or 4 years ago Python 2 was removed as a dependency from the core system packages and "python" started resolving to a Python 3 release.

I expect this has filtered down to RHEL9 now.

Multiple version are supported with "python2.7", "python3.9" etc. if a version older than the current default is required.

Re:YouTube-Dl Hosting Ban Paves the Way to Privatized Censor... by BeetleB on Thursday April 13, 2023 @11:03AM (#35556555)
Varies by distro. On Gentoo a python binary exists.
Re:YouTube-Dl Hosting Ban Paves the Way to Privatized Censor... by pasc1878 on Thursday April 13, 2023 @08:25AM (#35554331)
No the issue is that python on its own meant python2 for a long time and there are still distributions still using python2

I you need python3 the you need to put python3 in the shebang

Re:YouTube-Dl Hosting Ban Paves the Way to Privatized Censor... by yrro on Thursday April 13, 2023 @09:15AM (#35554934)
Expecting python3 to be available as 'python' means that _your_ install is broken (until the time when python3 re-implements all the syntax and semantics and stdlib of Python 2.7 so that code may run unmodified).
Re:YouTube-Dl Hosting Ban Paves the Way to Privatized Censor... by account42 on Thursday April 13, 2023 @11:52AM (#35557346)
Relying on `python` being compatible with whatever python version your scripts target is foolish.