1

I referred to an answer here to install youtube-dl using pip. Although youtube-dl was installed by default in my Ubuntu 20.04, by apt, but it was outdated and showing errors.

Besides, I used pip3 to install it by the command,

pip3 install --upgrade youtube-dl

and also uninstalled the outdated youtube-dl by the apt package manager.

When I use the command pip3 show youtube-dl, it shows an output as following:

Name: youtube-dl
Version: 2020.6.16.1
Summary: YouTube video downloader
Home-page: https://github.com/ytdl-org/youtube-dl
Author: Ricardo Garcia
Author-email: ytdl@yt-dl.org
License: Unlicense
Location: /home/vivek/.local/lib/python3.8/site-packages
Requires: 
Required-by:

I guess now I have to set it as environment variable so I can use it, since I am not able to use any of its commands, for eg.,

youtube-dl --version

gives me an output:

bash: /usr/bin/youtube-dl: No such file or directory

1 Answers1

3

The youtube-dl script is probably located in the /home/vivek/.local/bin directory. In that case all you need to do is to log out and log in again. By doing so the code in your ~/.profile file will automatically add the directory to PATH.

Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94