[MacPorts] #62361: pipenv crashes with "--user" option

MacPorts noreply at macports.org
Fri Feb 26 15:40:04 UTC 2021


#62361: pipenv crashes with "--user" option
---------------------------+--------------------
 Reporter:  workflowsguy   |      Owner:  (none)
     Type:  defect         |     Status:  new
 Priority:  Normal         |  Milestone:
Component:  ports          |    Version:  2.6.4
 Keywords:  Python pipenv  |       Port:  pipenv
---------------------------+--------------------
 When trying to install any python package with

 {{{
  pipenv install --user PYTHONPACKAGE
 }}}
 the install always fails with

 {{{
 Installing --user...
 Traceback (most recent call last):
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
 /site-packages/pkg_resources/_vendor/packaging/requirements.py", line 98,
 in __init__
     req = REQUIREMENT.parseString(requirement_string)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
 /site-packages/pkg_resources/_vendor/pyparsing.py", line 1654, in
 parseString
     raise exc
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
 /site-packages/pkg_resources/_vendor/pyparsing.py", line 1644, in
 parseString
     loc, tokens = self._parse( instring, 0 )
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
 /site-packages/pkg_resources/_vendor/pyparsing.py", line 1402, in
 _parseNoCache
     loc,tokens = self.parseImpl( instring, preloc, doActions )
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
 /site-packages/pkg_resources/_vendor/pyparsing.py", line 3417, in
 parseImpl
     loc, exprtokens = e._parse( instring, loc, doActions )
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
 /site-packages/pkg_resources/_vendor/pyparsing.py", line 1402, in
 _parseNoCache
     loc,tokens = self.parseImpl( instring, preloc, doActions )
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
 /site-packages/pkg_resources/_vendor/pyparsing.py", line 3739, in
 parseImpl
     return self.expr._parse( instring, loc, doActions, callPreParse=False
 )
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
 /site-packages/pkg_resources/_vendor/pyparsing.py", line 1402, in
 _parseNoCache
     loc,tokens = self.parseImpl( instring, preloc, doActions )
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
 /site-packages/pkg_resources/_vendor/pyparsing.py", line 3400, in
 parseImpl
     loc, resultlist = self.exprs[0]._parse( instring, loc, doActions,
 callPreParse=False )
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
 /site-packages/pkg_resources/_vendor/pyparsing.py", line 1406, in
 _parseNoCache
     loc,tokens = self.parseImpl( instring, preloc, doActions )
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
 /site-packages/pkg_resources/_vendor/pyparsing.py", line 2711, in
 parseImpl
     raise ParseException(instring, loc, self.errmsg, self)
 pkg_resources._vendor.pyparsing.ParseException: Expected W:(abcd...) (at
 char 0), (line:1, col:1)

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/vendor/requirementslib/models/requirements.py", line 966,
 in _parse_name_from_line
     self._requirement = init_requirement(self.line)
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/vendor/requirementslib/models/utils.py", line 200, in
 init_requirement
     req = Requirement.parse(name)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
 /site-packages/pkg_resources/__init__.py", line 3139, in parse
     req, = parse_requirements(s)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
 /site-packages/pkg_resources/__init__.py", line 3084, in
 parse_requirements
     yield Requirement(line)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
 /site-packages/pkg_resources/__init__.py", line 3094, in __init__
     super(Requirement, self).__init__(requirement_string)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
 /site-packages/pkg_resources/_vendor/packaging/requirements.py", line 100,
 in __init__
     raise InvalidRequirement(
 pkg_resources.extern.packaging.requirements.InvalidRequirement: Parse
 error at "'--user'": Expected W:(abcd...)

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/opt/local/bin/pipenv", line 8, in <module>
     sys.exit(cli())
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/vendor/click/core.py", line 829, in __call__
     return self.main(*args, **kwargs)
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/vendor/click/core.py", line 782, in main
     rv = self.invoke(ctx)
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/vendor/click/core.py", line 1259, in invoke
     return _process_result(sub_ctx.command.invoke(sub_ctx))
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/vendor/click/core.py", line 1066, in invoke
     return ctx.invoke(self.callback, **ctx.params)
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/vendor/click/core.py", line 610, in invoke
     return callback(*args, **kwargs)
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/vendor/click/decorators.py", line 73, in new_func
     return ctx.invoke(f, obj, *args, **kwargs)
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/vendor/click/core.py", line 610, in invoke
     return callback(*args, **kwargs)
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/vendor/click/decorators.py", line 21, in new_func
     return f(get_current_context(), *args, **kwargs)
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/cli/command.py", line 233, in install
     retcode = do_install(
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/core.py", line 2100, in do_install
     pkg_requirement = Requirement.from_line(pkg_line)
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/vendor/requirementslib/models/requirements.py", line 2676,
 in from_line
     parsed_line = Line(line)
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/vendor/requirementslib/models/requirements.py", line 171,
 in __init__
     self.parse()
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/vendor/requirementslib/models/requirements.py", line 1304,
 in parse
     self.parse_name()
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/vendor/requirementslib/models/requirements.py", line 1027,
 in parse_name
     name = self._parse_name_from_line()
   File "/Users/guy/Library/Python/3.8/lib/python/site-
 packages/pipenv/vendor/requirementslib/models/requirements.py", line 968,
 in _parse_name_from_line
     raise RequirementError(
 pipenv.vendor.requirementslib.exceptions.RequirementError: Failed parsing
 requirement from '--user'
 }}}

 This is with pipenv @2020.8.13_0

-- 
Ticket URL: <https://trac.macports.org/ticket/62361>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list