2

I recently updated my ubuntu from 15.10 to 16.04 and since then youtube-dl does not work. I get the following error

youtube-dl https://www.youtube.com/v=KV2ssT8lzj8
  Traceback (most recent call last):
    File "/usr/local/bin/youtube-dl", line 7, in <module>
      from youtube_dl import main
    ImportError: No module named 'youtube_dl'
6
  • Try youtube-dl https://www.youtube.com/watch?v=KV2ssT8lzj8 – DK Bose May 10 '16 at 17:11
  • @DKBose still the same error persists – rookie01 May 10 '16 at 17:29
  • Try installing youtube-dl again: sudo apt-get install --reinstall youtube-dl – user423626 May 10 '16 at 17:31
  • @BharadwajRaju same error even after reinstalling – rookie01 May 10 '16 at 17:52
  • try sudo pip install --upgrade youtube_dl – nicandris May 10 '16 at 18:07
2

try sudo pip install --upgrade youtube_dl. If a module is missing this is how you install it (in this case upgrade/reinstall)

0
5

Many users on similar QA all had problems because they didn't follow the official installation instructions.

If you used apt-get, remove the old version like this :

sudo apt-get autoremove --purge youtube-dl

Install the new one by using these commands :

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

Try again : youtube-dl https://www.youtube.com/watch?v=KV2ssT8lzj8

source

0

Python 2.7 reached end of life on January 1st, 2020.

If you installed youtube-dl using pip, uninstall with pip...:

sudo pip uninstall youtube_dl

(Note the _ in youtube_dl. Skip this to retain the old version.)


The other option is to keep the old one, and install it again with apt:

sudo apt-get install youtube-dl

If you do it this way, the path will be under /usb/bin.

-1

Did you try reinstalling youtube-dl ? And after reinstalling try this command

youtube-dl -cit https://www.youtube.com/watch?v=50VWOBi0VFs

Hope it helps

2
  • yes i did still the error persists. here is what i didsudo apt-get purge youtube-dl followed by sudo apt-get update then installed it using sudo apt-get install youtube-dl and finally did youtube-dl --update sadly the same error :( – rookie01 May 10 '16 at 18:10
  • Remove it and install it directly from their website sudo wget yt-dl.org/downloads/2016.05.10/youtube-dl -O /usr/local/bin/youtube-dl – Volshebnik May 10 '16 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.