Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3531

Raspberry Pi OS • Trouble installing yt-dlp on RPi5 with Pi-OS 64 bit

$
0
0
I have a new RPi5B 8GB device I want to use for video handling and it works great with all ffmpeg stuff I have tested.
But I cannot get yt-dlp to work properly, is there someone here who has experienced the same and have a solution?

I have a number of video download scripts using either ffmpeg (these work just fine) or yt-dlp.
I have also installed the command line video player mpv via apt and it pulled along yt-dlp itself.
When I try my script on this device it fails and yt-dlp suggests to update to the latest version, which is about 6 months later than what apt got me.
In my other installations on both RPi and Ubuntu I have manually installed yt-dlp using this command:

Code:

python3 -m pip install -U yt-dlp
But here after I use sudo apt remove yt-dlp to get rid of it and then the above code to install, it prints among other things:
Confirm you are on the latest version using yt-dlp -U
But here this does not work because yt-dlp was not installed using pip...
So I tried

Code:

sudo apt remove yt-dlp
and that worked according to the feedback from the command.

Then I tried the pip command:

Code:

$ python3 -m pip install -U yt-dlperror: externally-managed-environment× This environment is externally managed╰─> To install Python packages system-wide, try apt install    python3-xyz, where xyz is the package you are trying to    install.    If you wish to install a non-Debian-packaged Python package,    create a virtual environment using python3 -m venv path/to/venv.    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make    sure you have python3-full installed.    For more information visit http://rptl.io/venvnote: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.hint: See PEP 668 for the detailed specification.
So what can I do now to tell the system that I have in fact removed the yt-dlp package?

I want to be able to update yt-dlp using the -U switch but that seems to require that it was installed using pip...

Statistics: Posted by Bosse_B — Mon Dec 18, 2023 11:41 pm



Viewing all articles
Browse latest Browse all 3531

Trending Articles