我跑pip install -r requirements.txt
来安装我的一个包但没有好处。我反复得到以下错误日志。
任何人都知道如何解决这个问题?
------------------------------------------------------------
C:\flask\venv\Scripts\pip run on 05/09/14 20:20:55
Exception:
Traceback (most recent call last):
File "C:\flask\venv\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\flask\venv\lib\site-packages\pip\commands\install.py", line 262, in run
for req in parse_requirements(filename, finder=finder, options=options, session=session):
File "C:\flask\venv\lib\site-packages\pip\req.py", line 1631, in parse_requirements
req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None))
File "C:\flask\venv\lib\site-packages\pip\req.py", line 172, in from_line
return cls(req, comes_from, url=url, prereleases=prereleases)
File "C:\flask\venv\lib\site-packages\pip\req.py", line 70, in __init__
req = pkg_resources.Requirement.parse(req)
File "C:\flask\venv\lib\site-packages\pip\_vendor\pkg_resources.py", line 2667, in parse
reqs = list(parse_requirements(s))
File "C:\flask\venv\lib\site-packages\pip\_vendor\pkg_resources.py", line 2593, in parse_requirements
raise ValueError("Missing distribution spec", line)
ValueError: ('Missing distribution spec', '\xff\xfef\x00l\x00a\x00s\x00k\x00')
答案 0 :(得分:0)
我明白了。 Windows默认情况下将requirements.txt文件保存为Unicode。将文件保存到ansi修复了问题。