pythonanacondapackagecondapytube

How to install pytube3 in Anaconda?


In a quest to install pytube3 in Anaconda, searched for that package but couldn't find it

No pytube in Anaconda

Then, went to Anaconda Prompt and ran

conda install pytube3

No pytube in Anaconda prompt

None of this worked...


Solution

  • The easiest is to open Spyder and run the following in your kernel

    pip install pytube3
    

    Then, Restart kernel and you'll be able to use it just fine.

    Now, if you run

    pip show pytube3
    

    you'll see something like this

    pytube yey

    If then you try to download a file and get an error

      File "C:\Users\tiago\Anaconda3\lib\site-packages\pytube\extract.py", line 301, in <listcomp>
        parse_qs(formats[i]["cipher"]) for i, data in enumerate(formats)
    
    KeyError: 'cipher'
    

    then this answer will help you.