Wrong python with youtube-dl


Have a Leap 15.3 with XFCE (no packman repos) and youtube-dl installed. Whenever I try to update youtube-dl or download a vid (same errors), it complains of something related to python 2.7, while python 3 is available and should be usable:

sudo youtube-dl -U
[sudo] password for root: 
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/bin/youtube-dl/__main__.py", line 16, in <module>
  File "/usr/bin/youtube-dl/youtube_dl/__init__.py", line 15, in <module>
  File "/usr/bin/youtube-dl/youtube_dl/options.py", line 8, in <module>
  File "/usr/bin/youtube-dl/youtube_dl/downloader/__init__.py", line 3, in <module>
  File "/usr/bin/youtube-dl/youtube_dl/downloader/common.py", line 9, in <module>
  File "/usr/bin/youtube-dl/youtube_dl/compat.py", line 22, in <module>
ImportError: No module named xml.etree.ElementTree

What’s wrong and how to make youtube-dl use the right python?


zypper in -f python-xml

Yeah! That did the trick! Many thanks… :slight_smile: