Recientemente instalé youtube-dl desde github:https://github.com/rg3/youtube-dl
Funciona si lo ejecuto dentro de la carpeta de instalación, así:
$ cd /home/max/software/youtube-dl
$ bin/youtube-dl <url>
pero si intento usarlo en otro lugar me sale este error:
Traceback (most recent call last):
File "/home/max/software/youtube-dl/bin/youtube-dl", line 3, in <module>
import youtube_dl
ImportError: No module named youtube_dl
Esto sucede incluso si doy la ruta completa al ejecutable. También intenté copiar el ejecutable en /usr/local/bin
y crear un enlace simbólico allí.
Aquí está el contenido real del exe:
#!/usr/bin/env python
import youtube_dl
if __name__ == '__main__':
youtube_dl.main()
¿Quizás tenga algo que ver con el Python que se está cargando? which python
me da /usr/bin/python
.
Respuesta1
Esta publicación sugiere algunas soluciones para este problema.
https://stackoverflow.com/questions/18054500/how-to-use-youtube-dl-from-a-python-program
sudo pip install --upgrade youtube_dl