Search code examples
pythonubuntuyoutubeyoutube-dl

unable to install youtube-dl-api-server


I am unable to install youtube-dl-api-server. I am using Python 2.7.9. It looks like there is a bug in some dependency. I have tried install from source code but I was with the same result. After running command pip install –pre youtube_dl_server I got this message:

Exception:

 Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 257, in run
    InstallRequirement.from_line(name, None))
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 172, in from_line
    return cls(req, comes_from, url=url, prereleases=prereleases)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 70, in __init__
    req = pkg_resources.Requirement.parse(req)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2667, in parse
    reqs = list(parse_requirements(s))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2593, in parse_requirements
    raise ValueError("Missing distribution spec", line)
ValueError: ('Missing distribution spec', '\xe2\x80\x93r')

Storing debug log for failure in /home/ubuntu/.pip/pip.log 

I am using Python 2.7.9 on Ununtu Server. Do you have any idea how to solve this?

Thanks metjuf


Solution

  • There is a strange character in your command, most likely the result of some automatic conversion. I'm talking about (U+8211, b'\xe2\x80\x93' as UTF-8). So instead of

    pip install –pre youtube_dl_server 
    

    run

    pip install --pre youtube_dl_server