/usr/bin/env: ‘python’: No such file or directory #24583

Open
opened 2026-02-21 12:05:57 -05:00 by deekerman · 29 comments
Owner

Originally created by @yoones on GitHub (Oct 19, 2021).

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2021.06.06
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

yoones:~$ whereis youtube-dl
youtube-dl: /usr/local/bin/youtube-dl
yoones:~$ youtube-dl
/usr/bin/env: ‘python’: No such file or directory

Description

OS: Debian 11.1

I have the following binaries installed:

  • python2.7
  • python3
  • python3.9

The shebang of youtube-dl (#!/usr/bin/env python) does not work in this context since there is no executable file called python.

Suggested solution:

Have a shell script that acts as a launcher. This script could for instance embed a list of known python interpreters (python, python2.7, python3, ...) and use the first of the list that is present on the host.

Originally created by @yoones on GitHub (Oct 19, 2021). ## Checklist - [ ] I'm reporting a broken site support issue - [x] I've verified that I'm running youtube-dl version **2021.06.06** - [x] I've checked that all provided URLs are alive and playable in a browser - [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped - [x] I've searched the bugtracker for similar bug reports including closed ones - [x] I've read bugs section in FAQ ## Verbose log ``` yoones:~$ whereis youtube-dl youtube-dl: /usr/local/bin/youtube-dl yoones:~$ youtube-dl /usr/bin/env: ‘python’: No such file or directory ``` ## Description OS: Debian 11.1 I have the following binaries installed: - python2.7 - python3 - python3.9 The shebang of youtube-dl (`#!/usr/bin/env python`) does not work in this context since there is no executable file called `python`. **Suggested solution:** Have a shell script that acts as a launcher. This script could for instance embed a list of known python interpreters (python, python2.7, python3, ...) and use the first of the list that is present on the host.
Author
Owner

@dirkf commented on GitHub (Oct 19, 2021):

For the moment, install the python-is-python3 package. Or
sudo ln /usr/bin/python3 /usr/local/bin/python.

Debian decided that there shouldn't be a python command by default, perhaps to flush out Py 2 dependencies. Apparently the yt-dl Debian 11+ package would be responsible for patching the shebang(s).

For the self-extracting version, it would be necessary to identify what approach other distros are taking. Perhaps /usr/bin/python3 should be the new default.

@dirkf commented on GitHub (Oct 19, 2021): For the moment, install the _python-is-python3_ package. Or `sudo ln /usr/bin/python3 /usr/local/bin/python`. [Debian decided](https://www.debian.org/doc/packaging-manuals/python-policy/) that there shouldn't be a `python` command by default, perhaps to flush out Py 2 dependencies. Apparently the yt-dl Debian 11+ package would be responsible for patching the shebang(s). For the self-extracting version, it would be necessary to identify what approach other distros are taking. Perhaps `/usr/bin/python3` should be the new default.
Author
Owner

@Almaz commented on GitHub (Dec 21, 2021):

For me it worked like this: sudo ln /usr/bin/python3.8 /usr/local/bin/python.

@Almaz commented on GitHub (Dec 21, 2021): For me it worked like this: `sudo ln /usr/bin/python3.8 /usr/local/bin/python`.
Author
Owner

@nudgegoonies commented on GitHub (Jan 5, 2022):

Adjusting the shebang of youtube-dl to #!/usr/bin/env python3 works too.

@nudgegoonies commented on GitHub (Jan 5, 2022): Adjusting the shebang of youtube-dl to #!/usr/bin/env python3 works too.
Author
Owner

@yoones commented on GitHub (Jan 5, 2022):

Adjusting the shebang of youtube-dl to #!/usr/bin/env python3 works too.

Yes but changing the shebang manually only lasts until the next update of youtube-dl.

@yoones commented on GitHub (Jan 5, 2022): > Adjusting the shebang of youtube-dl to #!/usr/bin/env python3 works too. Yes but changing the shebang manually only lasts until the next update of youtube-dl.
Author
Owner

@nudgegoonies commented on GitHub (Jan 5, 2022):

Yes, but everything else is a workaround and not a fix. I have explicit not installed the python-is-python3 debian package to be able to find every shebang that ist wrong.

@nudgegoonies commented on GitHub (Jan 5, 2022): Yes, but everything else is a workaround and not a fix. I have explicit not installed the python-is-python3 debian package to be able to find every shebang that ist wrong.
Author
Owner

@dirkf commented on GitHub (Jan 5, 2022):

If you installed the python-is-python3 package they wouldn't be wrong, would they? And you can always uninstall it if you want none of your Python scripts to run, which is much more straightforward than managing a whole lot of manually patched scripts.

I take the position implied by the name of the package. If your script needs Python 2 put that in the shebang; otherwise just ask for Python. Let's hope that we don't have to go through all this again with some future Python 4.

@dirkf commented on GitHub (Jan 5, 2022): If you installed the _python-is-python3_ package they wouldn't be wrong, would they? And you can always uninstall it if you want none of your Python scripts to run, which is much more straightforward than managing a whole lot of manually patched scripts. I take the position implied by the name of the package. If your script needs Python 2 put that in the shebang; otherwise just ask for Python. Let's hope that we don't have to go through all this again with some future Python 4.
Author
Owner

@nudgegoonies commented on GitHub (Jan 5, 2022):

Every new major Python X version should be no trouble as long all scripts use pythonX in the shebang and as long no one depends on a default python executable to be a specific major version which will definitely increase in the future ;-)

@nudgegoonies commented on GitHub (Jan 5, 2022): Every new major Python X version should be no trouble as long all scripts use pythonX in the shebang and as long no one depends on a default python executable to be a specific major version which will definitely increase in the future ;-)
Author
Owner

@jehoshua7 commented on GitHub (Jan 15, 2022):

Have just installed youtube-dl as per the instruction on Kubuntu 20.04.3 , and got the error message. If I do a locate -i python , there are many pages. Does anyone know where the python executable is on Kubuntu please ? I can see /etc/python2.7/ , /etc/python3/ , and /etc/python3.8/ paths but they do not have the library,etc

@jehoshua7 commented on GitHub (Jan 15, 2022): Have just installed youtube-dl as per the instruction on Kubuntu 20.04.3 , and got the error message. If I do a `locate -i python` , there are many pages. Does anyone know where the python executable is on Kubuntu please ? I can see /etc/python2.7/ , /etc/python3/ , and /etc/python3.8/ paths but they do not have the library,etc
Author
Owner

@dirkf commented on GitHub (Jan 15, 2022):

Don't the original suggestions here help?

@dirkf commented on GitHub (Jan 15, 2022): Don't the original suggestions [here](https://github.com/ytdl-org/youtube-dl/issues/30129#issuecomment-946748616) help?
Author
Owner

@jehoshua7 commented on GitHub (Jan 15, 2022):

It seems the Kubuntu configuration setup has nothing in /usr/local/bin though.

ls -al /usr/bin/pyth*

lrwxrwxrwx 1 root root 9 Dec 28 2020 /usr/bin/python3 -> python3.8
-rwxr-xr-x 1 root root 5490488 Nov 27 07:14 /usr/bin/python3.8
lrwxrwxrwx 1 root root 33 Nov 27 07:14 /usr/bin/python3.8-config -> x86_64-linux-gnu-python3.8-config
lrwxrwxrwx 1 root root 16 Mar 13 2020 /usr/bin/python3-config -> python3.8-config

ls -al /usr/local/bin/

total 51172
drwxr-xr-x 2 root root 4096 Jan 15 18:17 .
drwxr-xr-x 10 root root 4096 Aug 1 2020 ..
-rwxr-xr-x 1 root root 529 Jun 5 2021 bundle
-rwxr-xr-x 1 root root 531 Jun 5 2021 bundler
-rwxr-xr-x 1 root root 50540544 Sep 4 20:16 hugo
-rwxr-xr-x 1 root root 1837828 Jan 15 18:17 youtube-dl

whereis python

python: /usr/bin/python3.8-config /usr/bin/python3.8 /usr/lib/python2.7 /usr/lib/python3.8 /usr/lib/python3.9 /etc/python2.7 /etc/python3.8 /usr/local/lib/python3.8 /usr/include/python3.8

@jehoshua7 commented on GitHub (Jan 15, 2022): It seems the Kubuntu configuration setup has nothing in /usr/local/bin though. `ls -al /usr/bin/pyth*` > lrwxrwxrwx 1 root root 9 Dec 28 2020 /usr/bin/python3 -> python3.8 -rwxr-xr-x 1 root root 5490488 Nov 27 07:14 /usr/bin/python3.8 lrwxrwxrwx 1 root root 33 Nov 27 07:14 /usr/bin/python3.8-config -> x86_64-linux-gnu-python3.8-config lrwxrwxrwx 1 root root 16 Mar 13 2020 /usr/bin/python3-config -> python3.8-config `ls -al /usr/local/bin/` > total 51172 drwxr-xr-x 2 root root 4096 Jan 15 18:17 . drwxr-xr-x 10 root root 4096 Aug 1 2020 .. -rwxr-xr-x 1 root root 529 Jun 5 2021 bundle -rwxr-xr-x 1 root root 531 Jun 5 2021 bundler -rwxr-xr-x 1 root root 50540544 Sep 4 20:16 hugo -rwxr-xr-x 1 root root 1837828 Jan 15 18:17 youtube-dl `whereis python` > python: /usr/bin/python3.8-config /usr/bin/python3.8 /usr/lib/python2.7 /usr/lib/python3.8 /usr/lib/python3.9 /etc/python2.7 /etc/python3.8 /usr/local/lib/python3.8 /usr/include/python3.8
Author
Owner

@dirkf commented on GitHub (Jan 15, 2022):

So either of the proposed solutions should work, assuming that Kubuntu 20.04 still has python-is-python3.

The proposal with the ln command is making a link in the /usr/local/bin/ directory, which is normally ahead of the main system directories in the PATH, so that typing python causes python3, which is actually python3.8, to run.

@dirkf commented on GitHub (Jan 15, 2022): So either of the proposed solutions should work, assuming that Kubuntu 20.04 still has _python-is-python3_. The proposal with the `ln` command is making a link in the `/usr/local/bin/` directory, which is normally ahead of the main system directories in the `PATH`, so that typing `python` causes `python3`, which is actually `python3.8`, to run.
Author
Owner

@jehoshua7 commented on GitHub (Jan 15, 2022):

Thanks for your help @dirkf . The ln did nothing ,but the package `python-is-python3' did the trick.

@jehoshua7 commented on GitHub (Jan 15, 2022): Thanks for your help @dirkf . The `ln` did nothing ,but the package `python-is-python3' did the trick.
Author
Owner

@pablodz commented on GitHub (May 29, 2022):

3.10 python3 uprgade on ubuntu 22 was the error

@pablodz commented on GitHub (May 29, 2022): 3.10 python3 uprgade on ubuntu 22 was the error
Author
Owner

@unit-cesar commented on GitHub (Jul 12, 2022):

Ubuntu 22.04

sudo ln /usr/bin/python3 /usr/local/bin/python
sudo apt install python-is-python3

@pablodz, It Works for me!

@unit-cesar commented on GitHub (Jul 12, 2022): Ubuntu 22.04 `sudo ln /usr/bin/python3 /usr/local/bin/python` `sudo apt install python-is-python3` @pablodz, It Works for me!
Author
Owner

@dirkf commented on GitHub (Mar 17, 2023):

Here is a script that can be used in POSIX shell, adapting as necessary, to modify the shebang of single file self-extracting yt-dl program, and possibly any other script.

@dirkf commented on GitHub (Mar 17, 2023): [Here](https://github.com/ytdl-org/youtube-dl/issues/31530#issuecomment-1449990989) is a script that can be used in POSIX shell, adapting as necessary, to modify the shebang of single file self-extracting yt-dl program, and possibly any other script.
Author
Owner

@byoso commented on GitHub (Mar 17, 2023):

Linux solution
So the dev team for some reason doesn't want to use #! /usr/bin/env python3 and prefers to ask the users to modify their system with python-is-python3. I wont argue with that, but as I don't want to do this, I show you a simple alternative solution on linux. Just add this script in your ~/bin directory (because it is in the PATH and without sudo, if you don't run an ubuntu fork os, add this directory to the PATH within the .bashrc) and use it to launch the app instead of using directly youtube-dl:

myyoutube-dl (make it executable)

#! /usr/bin/env python3

import sys
import os

args = sys.argv[1:]

params = ""
for arg in args:
    params += f" {arg}"

os.system(f"python3 /usr/local/bin/youtube-dl{params}")

Note: If you are running an ubuntu flavor OS and you haven't created the bin folder before, you must first create this folder and then reboot, the ubuntu's .bashrc is already configured to recognize this bin folder on boot and then add it to the PATH.

@byoso commented on GitHub (Mar 17, 2023): **Linux solution** So the dev team for some reason doesn't want to use `#! /usr/bin/env python3` and prefers to ask the users to modify their system with python-is-python3. I wont argue with that, but as I don't want to do this, I show you a simple alternative solution on linux. Just add this script in your ~/bin directory (because it is in the PATH and without sudo, if you don't run an ubuntu fork os, add this directory to the PATH within the .bashrc) and use it to launch the app instead of using directly `youtube-dl`: **myyoutube-dl** (make it executable) ```python #! /usr/bin/env python3 import sys import os args = sys.argv[1:] params = "" for arg in args: params += f" {arg}" os.system(f"python3 /usr/local/bin/youtube-dl{params}") ``` Note: If you are running an ubuntu flavor OS *and* you haven't created the bin folder before, you must first create this folder and then reboot, the ubuntu's .bashrc is already configured to recognize this bin folder on boot and then add it to the PATH.
Author
Owner

@dirkf commented on GitHub (Mar 17, 2023):

Why on earth would you do that rather than just making a python link on your PATH that points to your preferred Python?

~/bin may be in your PATH but that isn't necessarily or widely so.

some reason.

@dirkf commented on GitHub (Mar 17, 2023): Why on earth would you do that rather than just making a `python` link on your `PATH` that points to your preferred Python? `~/bin` may be in your `PATH` but that isn't necessarily or widely so. [some reason](https://github.com/ytdl-org/youtube-dl/issues/30129#issuecomment-1006067708).
Author
Owner

@byoso commented on GitHub (Mar 17, 2023):

Well, first linux did it wrong, and should have do the same as MacOs, but they didn't.
Here you have the choice between:

  • making your app incompatible with python2
  • making your app incompatible with linux

Both are bad choices, but your solution is to ask your linux users to make their system incompatible with python2. If totally burning the bridges with python2 wasn't an issue, you'd use #! /usr/bin/env python3, and for some reasons you are not, for the same reasons, maybe to be able to run old python2 scripts, some linux users may not want to 'break' this ability of their system to potentially install and run python2.
So this is where my little script above can solve this problem without changing the app nor the users systems.

@byoso commented on GitHub (Mar 17, 2023): Well, first linux did it wrong, and should have do the same as MacOs, but they didn't. Here you have the choice between: - making your app incompatible with python2 - making your app incompatible with linux Both are bad choices, but your solution is to ask your linux users to make their system incompatible with python2. If totally burning the bridges with python2 wasn't an issue, you'd use `#! /usr/bin/env python3`, and for some reasons you are not, for the same reasons, maybe to be able to run old python2 scripts, some linux users may not want to 'break' this ability of their system to potentially install and run python2. So this is where my little script above can solve this problem without changing the app nor the users systems.
Author
Owner

@nudgegoonies commented on GitHub (Mar 17, 2023):

Python 2 and 3 are incompatible major versions. With the introduction of Python 4 we will have the situation again that we need two different Python versions installed at the same time. A Python 3 program will not run on Python 2 and Python 4. So why rely on a default python that could be any major version rather than setting the required major version in the shebang which automatically selects the correct version?

@nudgegoonies commented on GitHub (Mar 17, 2023): Python 2 and 3 are incompatible major versions. With the introduction of Python 4 we will have the situation again that we need two different Python versions installed at the same time. A Python 3 program will not run on Python 2 and Python 4. So why rely on a default python that could be **any** major version rather than setting the **required** major version in the shebang which automatically selects the correct version?
Author
Owner

@byoso commented on GitHub (Mar 17, 2023):

@nudgegoonies I totally agree
I agree with you, this is a linux issue, they had the silly idea to call python2 just python.

And if I understood correctly, what python-is-python3 is just mapping 'python' to python3, it wont analyze the code to know if it is python3 or 2. As there are still some python2 apps that could be usefull (I can't tell any to be honest...), I prefer not to change my system that way unless some official distros are doing this themself, in my opinion it is to soon to do that.

And using this script is not more complex then installing python-is-python3, so, I just share an alternative to python-is-python3 which is not bad, but not to my taste.

For now, solving this on the dev side is just adding one character "3" in the __main__.py file only, when you will switch to python4, in a few years, you'll have to change it for a "4", it is less work than having this discussions :).
Not to mention that when python will come in version 4, it will mean that running python3 code with python4 will break, so you'll have to specify "4" anyway, or ask people to destroy their ability to run python3 and 2...

But I argued too much with this.

@byoso commented on GitHub (Mar 17, 2023): @nudgegoonies I totally agree I agree with you, this is a linux issue, they had the silly idea to call python2 just python. And if I understood correctly, what python-is-python3 is just mapping 'python' to python3, it wont analyze the code to know if it is python3 or 2. As there are still some python2 apps that could be usefull (I can't tell any to be honest...), I prefer not to change my system that way unless some official distros are doing this themself, in my opinion it is to soon to do that. And using this script is not more complex then installing python-is-python3, so, I just share an alternative to python-is-python3 which is not bad, but not to my taste. For now, solving this on the dev side is just adding one character "3" in the \_\_main__.py file only, when you will switch to python4, in a few years, you'll have to change it for a "4", it is less work than having this discussions :). Not to mention that when python will come in version 4, it will mean that running python3 code with python4 will break, so you'll have to specify "4" anyway, or ask people to destroy their ability to run python3 and 2... But I argued too much with this.
Author
Owner

@dirkf commented on GitHub (Mar 17, 2023):

Youtube-dl is a Python program, not a Python2 or Python3 program. When Python2 was more of a thing, and when yt-dl was created, Python2 was Python. My personal memory of Pythons doesn't go back to Python 1.x, but I gather that regular small changes in language behaviour were typical between 1.x and early 2.x versions, without a big fork as happened with 2->3.

As Python3 became more widespread, compatibility shims were added to yt-dl so that the code now uses a subset of Python3, avoiding incompatible syntax (eg f'{expression}') and with certain incompatible library calls hidden under aliases that invoke a shim suitable for the actual Python version.

Without speaking for Debian, I believe that this was their plan:

  • remove the python executable (alias) to flush out programs that don't mention 2 or 3
  • switch all packages that use Python to say one or the other explicitly
  • allow users to provide a default for other Python programs by installing one of the mutually incompatible python-is-python3 or python-is-python2 (while it lasts).

In this framework, if you as a user or system admin have Python programs that care about the Python version but just ask for python, you should decide where the majority lies, install the appropriate python-is-... package for those programs, and fix the others. yt-dl won't care whether you give it 2.7 or 3.9 (eg, but especially as I run those): it's just caught in the cross-fire.

This is just papering over the underlying problem that the Python language was forked incompatibly, like a toy language, but at least GvR did it more or less himself: JavaScript needs an entire standards committee.

@dirkf commented on GitHub (Mar 17, 2023): Youtube-dl is a Python program, not a Python2 or Python3 program. When Python2 was more of a thing, and when yt-dl was created, Python2 **was** Python. My personal memory of Pythons doesn't go back to Python 1.x, but I gather that regular small changes in language behaviour were typical between 1.x and early 2.x versions, without a big fork as happened with 2->3. As Python3 became more widespread, compatibility shims were added to yt-dl so that the code now uses a subset of Python3, avoiding incompatible syntax ([eg](https://gist.github.com/dirkf/26c1dc0e0f29e2663c8cfd58f932aca6) `f'{expression}'`) and with certain incompatible library calls hidden under aliases that invoke a shim suitable for the actual Python version. Without speaking for [Debian](https://packages.debian.org/source/bullseye/what-is-python), I believe that this was their plan: * remove the `python` executable (alias) to flush out programs that don't mention 2 or 3 * switch all packages that use Python to say one or the other explicitly * allow users to provide a default for other Python programs by installing one of the mutually incompatible _python-is-python3_ or _python-is-python2_ (while it lasts). In this framework, if you as a user or system admin have Python programs that care about the Python version but just ask for `python`, you should decide where the majority lies, install the appropriate _python-is-..._ package for those programs, and fix the others. yt-dl won't care whether you give it 2.7 or 3.9 (eg, but especially as I run those): it's just caught in the cross-fire. This is just papering over the underlying problem that the Python language was forked incompatibly, like a toy language, but at least GvR did it more or less himself: JavaScript needs an entire standards committee.
Author
Owner

@byoso commented on GitHub (Mar 17, 2023):

Ok, thank you for making this point more clear. If I understand, the team wants to keep the app compatible with both 2 and 3. I will try to think about that, maybe it is possible to keep compatibility with both 2 and 3 another way.

@byoso commented on GitHub (Mar 17, 2023): Ok, thank you for making this point more clear. If I understand, the team wants to keep the app compatible with both 2 and 3. I will try to think about that, maybe it is possible to keep compatibility with both 2 and 3 another way.
Author
Owner

@superbonaci commented on GitHub (Jul 1, 2024):

macOS 14.5 does not have any python*, only python3.

@superbonaci commented on GitHub (Jul 1, 2024): macOS 14.5 does not have any python*, only python3.
Author
Owner

@dirkf commented on GitHub (Jul 1, 2024):

With such macOS, or if Debian abandons the package mentioned, either

  • install using -m pip with a Python that is available, or
  • create a symlink to some Python executable on your system, like the above python3.
@dirkf commented on GitHub (Jul 1, 2024): With such macOS, or if Debian abandons the package mentioned, either * install using `-m pip` with a Python that is available, or * create a symlink to some Python executable on your system, like the above `python3`.
Author
Owner

@superbonaci commented on GitHub (Jul 1, 2024):

Does the -m pip install the latest nightly and keeps it updated? Because the stable version 2021.12.17 is broken for certain videos.

@superbonaci commented on GitHub (Jul 1, 2024): Does the `-m pip` install the latest nightly and keeps it updated? Because the stable version 2021.12.17 is broken for certain videos.
Author
Owner

@dirkf commented on GitHub (Jul 1, 2024):

In fact, the stable version is almost completely useless for YouTube and probably many other sites that it originally supported.

With the pip solution, you need to specify the .tar.gz archive from the appropriate release page to prevent pip from looking in pypi.org. The second solution with the bundled executable will support -U to update to the latest nightly release.

@dirkf commented on GitHub (Jul 1, 2024): In fact, the stable version is almost completely useless for YouTube and probably many other sites that it originally supported. With the _pip_ solution, you need to [specify the .tar.gz archive](https://adamj.eu/tech/2019/03/11/pip-install-from-a-git-repository/) from the appropriate release page to prevent _pip_ from looking in pypi.org. The second solution with the bundled executable will support `-U` to update to the latest nightly release.
Author
Owner

@superbonaci commented on GitHub (Jul 2, 2024):

Why do you have to call directly python? They already made a mess renaming all python2 links to python for compatibility, then python3 to python2 or python, and now they want to revert the changes.

I can't make a python symlink to python3 system wide because can break something. python 1 and 2 are end of life this is why macOS does not include them anymore.

Could you offer 3 different nightlies where each one calls a different python? So brew.sh can download the best one for each system and not just call "python" for everybody. For example:

https://github.com/ytdl-org/ytdl-nightly/releases/tag/2024.06.21_python1
https://github.com/ytdl-org/ytdl-nightly/releases/tag/2024.06.21_python2
https://github.com/ytdl-org/ytdl-nightly/releases/tag/2024.06.21_python3

All files inside:
https://github.com/ytdl-org/ytdl-nightly/releases/download/2024.06.21_python3/youtube-dl
https://github.com/ytdl-org/ytdl-nightly/releases/download/2024.06.21_python3/youtube-dl.exe

@superbonaci commented on GitHub (Jul 2, 2024): Why do you have to call directly python? They already made a mess renaming all `python2` links to `python` for compatibility, then `python3` to `python2` or `python`, and now they want to revert the changes. I can't make a `python` symlink to `python3` system wide because can break something. python 1 and 2 are end of life this is why macOS does not include them anymore. Could you offer 3 different nightlies where each one calls a different python? So brew.sh can download the best one for each system and not just call "python" for everybody. For example: https://github.com/ytdl-org/ytdl-nightly/releases/tag/2024.06.21_python1 https://github.com/ytdl-org/ytdl-nightly/releases/tag/2024.06.21_python2 https://github.com/ytdl-org/ytdl-nightly/releases/tag/2024.06.21_python3 All files inside: https://github.com/ytdl-org/ytdl-nightly/releases/download/2024.06.21_python3/youtube-dl https://github.com/ytdl-org/ytdl-nightly/releases/download/2024.06.21_python3/youtube-dl.exe
Author
Owner

@dirkf commented on GitHub (Jul 2, 2024):

If you don't have a python executable now, symlinking your Python3 as python shouldn't affect anything (though there are weird code tricks that could be affected). A paranoid user could put the python link in a directory that's only added to PATH in the user's shell session, or only when needed, etc.

Other than the offered solutions, do the equivalent of alias youtube-dl="python3 wherever/youtube-dl" in your shell. You can also install the latest master using Homebrew (read their docs for the details that I have now forgotten). Or build the program yourself, or ask Homebrew (or similar) to package the release.

@dirkf commented on GitHub (Jul 2, 2024): If you don't have a `python` executable now, symlinking your Python3 as `python` shouldn't affect anything (though there are weird code tricks that could be affected). A paranoid user could put the `python` link in a directory that's only added to `PATH` in the user's shell session, or only when needed, etc. Other than the offered solutions, do the equivalent of `alias youtube-dl="python3 wherever/youtube-dl"` in your shell. You can also install the latest master using Homebrew (read their docs for the details that I have now forgotten). Or build the program yourself, or ask Homebrew (or similar) to package the release.
Author
Owner

@dirkf commented on GitHub (Mar 16, 2025):

Also: https://github.com/ytdl-org/youtube-dl/issues/31530#issuecomment-2715887479

@dirkf commented on GitHub (Mar 16, 2025): Also: https://github.com/ytdl-org/youtube-dl/issues/31530#issuecomment-2715887479
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#24583
No description provided.