4

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

from pytube import YouTube
ImportError: cannot import name 'YouTube'
klutt
  • 30,332
  • 17
  • 55
  • 95
Abdilatif Musa
  • 105
  • 1
  • 2
  • 4
  • 1
    Check if you have `pytube.py` in the current directory and rename it to something else. – Kenly Jan 01 '16 at 15:10

6 Answers6

3

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

wow2006
  • 311
  • 3
  • 6
2
pip uninstall pytube 

and install pytube3 using pip install pytube3

0

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.

Amit Prafulla
  • 381
  • 2
  • 5
0

try installing pytube3. it worked for me.

 pip install pytube3
Lijo
  • 1
  • 2
0

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.

0

Try Using

pip uninstall pytube

and then

pip install pytube