Windows 8 - For Python can't get 'pip install -r requirements.txt' to work

Tag: python-2.7 , virtualenv , requirements.txt Author: xrj3499 Date: 2014-04-23

I ran 'pip install -r requirements.txt' to install my one package but no good. I repeatedly get the below error log.

Anyone know how I can fix this?

------------------------------------------------------------
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')

Other Answer1

I figured it out. Windows saved the requirements.txt file to Unicode by default. Saving the file to ansi fixed the issue.