Sangrah yt-dlp, the clean way

Install yt-dlp with pipx so it never fights Ubuntu's system Python, force mp4 as your default output, and wire up an animated download progress bar. Seven steps, no venv to babysit.
setup_sangrah.sh
One-shot script: venv + yt-dlp + rich + deno + mp4 config + ytdl-nice progress wrapper.
download
Note — pipx still uses a virtual environment under the hood. What you're skipping is managing it yourself; pipx creates and hides it for you.
step 1
Install pipx
pipx installs Python CLI tools into their own isolated environments automatically. This is the officially recommended way around Ubuntu's externally-managed-environment restriction.
sudo apt update && sudo apt install -y pipx pipx ensurepath
step 2
Restart your shell
Picks up the PATH changes pipx just made, so the pipx and later yt-dlp commands are found.
source ~/.bashrc
or just close and reopen the terminal window.
step 3
Install yt-dlp with pipx
Drops a working yt-dlp command on your PATH, backed by its own isolated environment — you never have to think about that environment again.
pipx install yt-dlp
step 4
Inject rich into yt-dlp's environment
Adds the rich library into that same isolated environment, so a custom script can import both yt_dlp and rich together for the animated progress bar.
pipx inject yt-dlp rich
step 5
Install deno (JS runtime)
Clears the "No supported JavaScript runtime" warning and restores full format extraction on YouTube.
curl -fsSL https://deno.land/install.sh | sh
restart your terminal again after this one.
step 6
Force mp4 output by default
Writes a config so plain yt-dlp always merges video + audio into .mp4, instead of whatever container the source streams happen to use.
mkdir -p ~/.config/yt-dlp printf '%s\n' \ '-f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best"' \ '--merge-output-format mp4' \ >> ~/.config/yt-dlp/config
step 7
Verify it works
Confirm the command resolves and (optionally) that mp4 is the default merge format.
which yt-dlp
yt-dlp --print merge-output-format
should print mp4.
Before you start

These steps assume Ubuntu/Debian with apt available. If pipx is already installed, step 1 is a no-op — apt will just confirm it's up to date.

Each step is independent to run — if one fails partway, fix that step and continue from there rather than starting over.