Reputation: 105
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
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
Reputation: 78
pip uninstall pytube
and install pytube3 using
pip install pytube3
Upvotes: 2
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
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