All I wanted is to install the current yt-dlp (2024.07.16-1) on debian 12.6.

Suggested way to that according to https://packages.debian.org/sid/all/yt-dlp/download is to add that line to that file (etc/apt/sources.list), but do I really need to download the 1600 files that upgrade would entail?

I don’t want to download the tar.gz 'cause upgrading that would be a pain.

  • taaz@biglemmowski.win
    link
    fedilink
    English
    arrow-up
    11
    ·
    2 months ago

    pipx install yt-dlp

    This will install yt-dlp with everything it needs but without fucking anything else up, both system-wise and for your user (because installing python packages in your home manually can cause problems). You must have your $HOME/.local/bin in $PATH to then be able to run yt-dlp, but I think pipx will check and warn you.

    pipx upgrade yt-dlp to update it (or upgrade-all)

    • Baldur Nil@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      2 months ago

      That’s what I do, except I straight up create the python venv in a folder, activate it and then do pip install yt-dlp. No messing up with my system.

      • Eager Eagle@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        2 months ago

        pipx does that without this manual process - it’s meant for these standalone apps that are in your $PATH.

        • Baldur Nil@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          2 months ago

          It’s a good concept, I just have to look it up and understand exactly what it is doing before I start using it.

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

    If you want the latest version of most python apps, I’d recommend using pipx, since it’ll create python virtual environments for each app installed, and won’t mess with system packages.

  • bloodfart@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    2 months ago

    What you are doing: adding the unstable repository to your Debian system. Debian has three levels of software stability, stable, testing and unstable.

    Stable does what is says on the tin. It’s stable, but older. Testing is gonna be the next major version when it’s deemed stable enough to be called stable. Unstable is for trying out new shit and seeing what breaks. It has the most recent packages and the most problems.

    Stable and testing will be named after different characters from Toy Story, unstable will always be named after the character “Sid” from Toy Story.

    In the context of what you’re trying to do, you are fucking up.

    Yt-dlp can (and should in most cases) update itself by using the command “yt-dlp -U”. But it will only update itself that way if you manually install it from the git page.

    You can do this by downloading it and putting it somewhere in your users $path. This is just like putting a program folder in windows in c:\program files and making a start menu entry manually, except you won’t make the start menu entry because your shell will always look in $path to see if it can run what you just typed. If you’re familiar with Macs, it’s literally like copying the program to your applications directory.

    There’s instructions how to manually install on the yt-dlp git.

    You should do yt-dlp this way unless you have a good reason to use the Debian repos or pip.

    E: once you get yourself straightened out, make sure to add “yt-dlp -U” to all your scripts before they actually run. It keeps you from getting the wrong quality profile or downloads from failing or whatever.

  • GustavoM@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 months ago

    Just install it via pip and then symlink its binary file to /usr/bin.

    t. Am running a live stream 24/7 on my orange pi zero 3 (via ffplay/yt-dlp) since forever.

    “Why not simply add $HOME/.local/bin to $PATH?”

    Because it breaks things. While symlinking it does not.

    “Why?”

    No idea, honestly.

    Also, you can take a step further and make a tmpfs partition @ $HOME/.local and then add the following line to your .bash_profile file: TMPDIR=$HOME/.local pip install --break-system-packages -I --no-input yt-dlp &&.