Page MenuHomePhabricator

Toolforge pip cannot handle the requirements as formatted by pipenv
Closed, ResolvedPublic


In rTHER4371cb35700e we moved to use pipenv for managing requirements, and the requirements.txt file is now generated by pipenv.

The format used does not work well with the pip installed on Toolforge.

Traceback (reproduced locally):

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/", line 122, in main
    status =, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/", line 262, in run
    for req in parse_requirements(filename, finder=finder, options=options, session=session):
  File "/usr/lib/python2.7/dist-packages/pip/", line 1632, in parse_requirements
    req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None))
  File "/usr/lib/python2.7/dist-packages/pip/", line 173, in from_line
    return cls(req, comes_from, url=url, prereleases=prereleases)
  File "/usr/lib/python2.7/dist-packages/pip/", line 71, in __init__
    req = pkg_resources.Requirement.parse(req)
  File "/usr/lib/python2.7/dist-packages/", line 2667, in parse
    reqs = list(parse_requirements(s))
  File "/usr/lib/python2.7/dist-packages/", line 2605, in parse_requirements
    line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
  File "/usr/lib/python2.7/dist-packages/", line 2583, in scan_list
    "Expected ',' or end-of-list in",line,"at",line[p:]
ValueError: ("Expected ',' or end-of-list in", "urllib3==1.23; python_version >= '2.6'", 'at', "; python_version >= '2.6'")

This was temporarily solved by changing the requirements file manually on the server...

Event Timeline

Change 457840 had a related patch set uploaded (by Jean-Frédéric; owner: Jean-Frédéric):
[labs/tools/heritage@master] Install the latest Pip in the virtual environment

Change 457840 merged by jenkins-bot:
[labs/tools/heritage@master] Install the latest Pip in the virtual environment