Reputation: 516
I want to use youtube-dl in a python script, not using commands. I installed youtube-dl using pip install youtube-dl
and I also tried installing it using pip install --upgrade youtube-dl
and also pip3 install youtube-dl
. It keeps saying I have it installed so I'm guessing the installation is fine.
When I try to use import youtube_dl
it gives me the error: unresolved import 'youtube_dl'Python(unresolved-import)
Please help!
Upvotes: 0
Views: 1838
Reputation: 1821
This is a VS Code issue and not a youtube-dl issue. What you need to do is
.env
file.env
file add the line PYTHONPATH=codeFolder
(replace codeFolder with your folder name)"python.envFile": "${workspaceFolder}/.env"
to the settings.json
Upvotes: 1