How to install *latest* yt-dlp on Ubuntu Server 24.04.1 LTS?
Bo Berglund
bo.berglund at gmail.com
Mon Feb 10 19:51:28 UTC 2025
My Ubuntu Server 24.04.1 LTS PRO is installed from scratch a few weeks ago and
it is tasked with all of my video work as well as a set of other jobs too.
The version of yt-dlp I have installed via apt does not work fully on Youtube, I
sometimes get "error: externally-managed-environment" during download.
I found a how-to for getting the latest version of yt-dlp here:
https://www.spacebar.news/how-to-install-yt-dlp/
So I tried it on my Windows 10 PC first and when done it actually worked without
errors to download the problem video from YT. :-)
So far so good, but I need this on my *server* where I am doing all of my video
handling and here the suggested installation method fails...
What I did is this:
1) sudo apt remove yt-dlp #To ensure no interference
2) sudo apt install python3 python3-pip ffmpeg
(I already had these but now for sure at the latest versions)
3) python3 -m pip install -U "yt-dlp[default]"
error: externally-managed-environment
plus a long block of text:
× 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.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.12/README.venv for more information.
I don't understand this explanation but wonder what I could do now that the
cook-book command did not work?
And I have never programmed in python so I don't know how that is done either.
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list