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

  • Auster@lemmy.world
    link
    fedilink
    arrow-up
    2
    arrow-down
    2
    ·
    2 days ago

    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

    • SteveTech@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 day ago

      Don’t Python scripts need python at the beginning of the command that summons them?

      Not if the script has a python shebang (e.g. #!/usr/bin/env python3), then it will run like any other script.