Posted: . At: 10:22 AM. This was 6 months ago. Post ID: 18717
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Upgrade yt-dlp after installation with pip.


Upgrading yt-dlp after installing with pip on Linux is very easy, I had an old version installed and needed to upgrade it.

We are upgrading the yt-dlp installation.

╭──(john㉿DESKTOP-PF01IEE)───╮
╰───────────────────────────╾╯(~)-(172.24.179.181)┋ pip install --upgrade yt-dlp
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: yt-dlp in ./.local/lib/python3.11/site-packages (2022.11.11)
Collecting yt-dlp
  Downloading yt_dlp-2023.10.13-py2.py3-none-any.whl.metadata (158 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 158.6/158.6 kB 2.2 MB/s eta 0:00:00
Requirement already satisfied: mutagen in /usr/lib/python3/dist-packages (from yt-dlp) (1.46.0)
Requirement already satisfied: pycryptodomex in /usr/lib/python3/dist-packages (from yt-dlp) (3.11.0)
Requirement already satisfied: websockets in /usr/lib/python3/dist-packages (from yt-dlp) (10.4)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from yt-dlp) (2023.7.22)
Requirement already satisfied: brotli in /usr/lib/python3/dist-packages (from yt-dlp) (1.0.9)
Downloading yt_dlp-2023.10.13-py2.py3-none-any.whl (3.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 5.6 MB/s eta 0:00:00
Installing collected packages: yt-dlp
  Attempting uninstall: yt-dlp
    Found existing installation: yt-dlp 2022.11.11
    Uninstalling yt-dlp-2022.11.11:
      Successfully uninstalled yt-dlp-2022.11.11
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
twitter-video-tools 2023.4.15 requires yt-dlp<2023.0.0,>=2022.11.11, but you have yt-dlp 2023.10.13 which is incompatible.
Successfully installed yt-dlp-2023.10.13

I needed to upgrade a dependency after this, but it was easy.

╭──(john㉿DESKTOP-PF01IEE)───╮
╰───────────────────────────╾╯(~)-(172.24.179.181)┋ pip install --upgrade twitter-video-tools
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: twitter-video-tools in ./.local/lib/python3.11/site-packages (2023.4.15)
Requirement already satisfied: bs4<0.0.2,>=0.0.1 in ./.local/lib/python3.11/site-packages (from twitter-video-tools) (0.0.1)
Requirement already satisfied: playwright<2.0.0,>=1.27.1 in ./.local/lib/python3.11/site-packages (from twitter-video-tools) (1.38.0)
Requirement already satisfied: requests<3.0.0,>=2.28.1 in ./.local/lib/python3.11/site-packages (from twitter-video-tools) (2.31.0)
Requirement already satisfied: typer<0.8.0,>=0.7.0 in ./.local/lib/python3.11/site-packages (from typer[all]<0.8.0,>=0.7.0->twitter-video-tools) (0.7.0)
Collecting yt-dlp<2023.0.0,>=2022.11.11 (from twitter-video-tools)
  Downloading yt_dlp-2022.11.11-py2.py3-none-any.whl (2.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.8/2.8 MB 4.5 MB/s eta 0:00:00

This is very painless and easy to do.

Now I can download YouTube content using this useful Python script.

╭──(john㉿DESKTOP-PF01IEE)───╮
╰───────────────────────────╾╯(/mnt/g)-(172.24.185.75)┋ yt-dlp -f 233 https://www.youtube.com/watch?v=kpdqKct73NM
[youtube] Extracting URL: https://www.youtube.com/watch?v=kpdqKct73NM
[youtube] kpdqKct73NM: Downloading webpage
[youtube] kpdqKct73NM: Downloading ios player API JSON
[youtube] kpdqKct73NM: Downloading android player API JSON
[youtube] kpdqKct73NM: Downloading m3u8 information
[info] kpdqKct73NM: Downloading 1 format(s): 233
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 38
[download] Destination: Locksmiths Don't Want You Know This! Open Lock Without Key [kpdqKct73NM].mp4
[download] 100% of    1.24MiB in 00:00:06 at 203.56KiB/s

This is easy to do. Installing a Python script with pip does allow easier updating and management of Python software.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.