This project has moved. For the latest updates, please go here.


requirements.txt in worker role template shouldn't have BOM


I don't know about other versions of python/pip, but pip 1.4.1 (the one we install) and python 2.7 have trouble when the requirements.txt has a BOM. Deleting the first 3 bytes of the file in a hex editor solves the issue.
Installing '-r "c:\projects\temp\WorkerProject3\WorkerProject3\"'
Traceback (most recent call last):
  File "c:\projects\temp\WorkerProject3\WorkerProject3\env\lib\site-packages\pip\", line 134, in main
    status =, args)
  File "c:\projects\temp\WorkerProject3\WorkerProject3\env\lib\site-packages\pip\commands\", line 220, in run
    for req in parse_requirements(filename, finder=finder, options=options):
  File "c:\projects\temp\WorkerProject3\WorkerProject3\env\lib\site-packages\pip\", line 1477, in parse_requirements
    req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None))
  File "c:\projects\temp\WorkerProject3\WorkerProject3\env\lib\site-packages\pip\", line 129, in from_line
    return cls(req, comes_from, url=url, prereleases=prereleases)
  File "c:\projects\temp\WorkerProject3\WorkerProject3\env\lib\site-packages\pip\", line 44, in __init__
    req = pkg_resources.Requirement.parse(req)
  File "c:\projects\temp\WorkerProject3\WorkerProject3\env\lib\site-packages\", line 2914, in parse
    reqs = list(parse_requirements(s))
  File "c:\projects\temp\WorkerProject3\WorkerProject3\env\lib\site-packages\", line 2827, in parse_requirements
    raise ValueError("Missing distribution spec", line)
ValueError: ('Missing distribution spec', '\xef\xbb\xbffrom azure.servicebus import ServiceBusService')
Storing complete log in C:\Users\huvalo\pip\pip.log
'-r "c:\projects\temp\WorkerProject3\WorkerProject3\"' failed to install. Exit code: 2


Zooba wrote May 19, 2014 at 10:22 PM

It works fine with pip 1.5.4 (which is now the one we install), but go ahead and remove the BOM.

huguesv wrote May 20, 2014 at 8:44 PM

It didn't work for me with pip 1.5.4, so I've deleted the BOM.