0

I would like to import youtube-dl into my code for a discord.py bot I have not understood how to install the youtube-dl package on my pc. (I downloaded the .exe file etc, but I don't understand).

Thanks in advance for any help given.

Théo
  • 1
  • 1
  • 3
  • 1
    If you install it via `pip install --upgrade youtube-dl` is it useable as a library? The .exe is just the standalone compiled version of the program, you can't just use it as a library. – Random Davis Dec 02 '21 at 19:01

2 Answers2

0

Installing packages for Python goes via pip most of the time, execute this command in your terminal:

pip install youtube_dl

For more info about importing into your python application please refer to this link

Jelle
  • 198
  • 9
  • thank you for answering me – Théo Dec 02 '21 at 20:01
  • Hey @Théo , if you thought my answer was helpful please consider marking it as accepted. If you dont know how, you can refer to [this link](https://stackoverflow.com/help/someone-answers)! – Jelle Dec 05 '21 at 11:56
-1

You need to execute pip install youtube-dl in your terminal

After that, you can import the module with from youtube-dl import *

Marcucus _
  • 88
  • 10
  • When I execute `pip install youtube-dl`, it shows me this in the terminal: Requirement already satisfied: youtube-dl in c:\users\ready player\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (2021.6.6) I guess that's ok. But when I write: `from youtube-dl import *` it tells me that it does not recognize this import. Did I do something wrong? – Théo Dec 02 '21 at 20:23
  • Execute `pip uninstall youtube-dl` to uninstall the module and reinstall it after that – Marcucus _ Dec 03 '21 at 21:41