Abdilatif Musa
Abdilatif Musa

Reputation: 105

PYTUBE module error

Every time I try to use the PYTUBE module it shows this error.

from pytube import YouTube
ImportError: cannot import name 'YouTube'

Upvotes: 4

Views: 24140

Answers (6)

Ridam Aggarwal
Ridam Aggarwal

Reputation: 17

Try Using

pip uninstall pytube

and then

pip install pytube

Upvotes: 0

Lijo
Lijo

Reputation: 1

try installing pytube3. it worked for me.

 pip install pytube3

Upvotes: 0

Lanfufu
Lanfufu

Reputation: 1

There might be mistakes in using which pip to install the package. There are both python 2 and 3 in my computer, and I am working with python3, so I use pip3 install pytube3 instead of pip install pytube3.

Upvotes: 0

Lokendra Kumar Ved
Lokendra Kumar Ved

Reputation: 78

pip uninstall pytube 

and install pytube3 using pip install pytube3

Upvotes: 2

Amit Prafulla
Amit Prafulla

Reputation: 381

It's highly recommended to update pytube, I just fixed this error. Just uninstall the package using

pip uninstall pytube

and reinstall it, it should work as it did for me.

Upvotes: 0

Ahmed Hussein
Ahmed Hussein

Reputation: 321

I think you did not install PyTube.

to check for that you can type that :

pip list | grep PyTube

If you found return as

PyTube (0.1)

So you install PyTube if not you should install Pytube using

sudo pip install PyTube

or you can use

git clone https://github.com/nficano/pytube.git && cd pytube
setup.py build
sudo setup.py install

I hope to help

Upvotes: 3

Related Questions