我无法安装youtube-dl-api-server。我使用的是Python 2.7.9。看起来某些依赖项中存在错误。我尝试从源代码安装,但我得到了相同的结果。运行命令pip install -pre youtube_dl_server后我得到了这条消息:
例外:
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
我在Ununtu Server上使用Python 2.7.9。你知道如何解决这个问题吗?
谢谢metjuf
答案 0 :(得分:0)
您的命令中有一个奇怪的字符,很可能是某些自动转换的结果。我正在谈论–
(U + 8211,b'\xe2\x80\x93'
为UTF-8)。而不是
pip install –pre youtube_dl_server
运行
pip install --pre youtube_dl_server