[BUG] ImportError: cannot import name urlencode
See original GitHub issueI just installed the newes python and pytube, still pytube isn´t working at all. I just started with python (i know c++ so i get the basics (i hope)) Am i just too bad using python?
Describe the bug
Using this in python cmd:
pytube https://youtube.com/watch?v=2lAe1cqCOXo
I get: SyntaxError: invalid syntax
using the same line on Linux i get: ImportError: cannot import name urlencode
using this:
from pytube import YouTube yt = YouTube("https://youtu.be/U16Xg_rQZkA") print(ty.title) stream = yt.streams.first() stream.download()
nothing happends and cmd just closes
using this:
from pytube import YouTube YouTube('https://www.youtube.com/watch?v=-TEGPelS3Ac').streams.first().download()
the same happens
System information Please provide the following information: newest python version newest pytube version win 10/ Ubuntu
Issue Analytics
- State:
- Created 3 years ago
- Comments:11
thank you! finally works 😃
yes,
pytube https://www.youtube.com/watch?v=U16Xg_rQZkA
belongs in the normal win cmd, however it will require you to have your PATH set up correctly. When you installed python, did you use an installer from python.org? Part of their installation process asks you if you want to set the PATH variable, and if you didn’t check that box, you’ll need to set your PATH variable manually. It’s kind of annoying to do that though, so you might try re-installing python and making sure to check that box during the installation