debian 13.0, downloaded yt-dlp with wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O ~/.local/bin/yt-dlp
the python script is in that directory, but if I execute yt-dlp on the terminal it returns bash: yt-dlp: command not found
what should I do?
SOLVED: add .local/bin to your $PATH
Don’t Python scripts need
python
at the beginning of the command that summons them?Alternatively, you can make an alias to ~/.bashrc:
alias yt-dl="python3 /path/to/yt-dlp [options] "
And replace[options]
for flags you may want to always use, if any. Or delete if you just want the raw script to be tied to a terminal command.Then reload .bashrc by running either
source .bashrc
or. .bashrc
Not if the script has a python shebang (e.g.
#!/usr/bin/env python3
), then it will run like any other script.Wasn’t aware of that. Thanks for explaining!