pipenv
pipenv copied to clipboard
InstallationError exception (Expected end or semicolon) using requirements with markers
Issue description
We have a set of mutually-exclusive requirements in our Pipfile to facilitate Arm-based Mac Ever since the release of date when pipenv-2024.1.0 was released our pipenv install command is failing. tensorflow-cpu = {"version"="~=2.13.0", markers="platform_machine != 'arm64'"} tensorflow = {"version"="~=2.13.0", markers="platform_machine == 'arm64'"}
Expected result
Describe what you expected.
Actual result
When possible, provide the verbose output (--verbose), especially for locking and dependencies resolving issues.
Steps to replicate
2024-10-07T17:52:56.9855786Z Updated Pipfile.lock (acf54f59e98de30824501c4502bac36b3200da5011fbfda911e506fe2b611b50)!
2024-10-07T17:52:56.9863105Z To activate this project's virtualenv, run pipenv shell.
2024-10-07T17:52:56.9864686Z Alternatively, run a command inside the virtualenv with pipenv run.
2024-10-07T17:52:57.0046901Z To activate this project's virtualenv, run pipenv shell.
2024-10-07T17:52:57.0048278Z Alternatively, run a command inside the virtualenv with pipenv run.
2024-10-07T17:52:57.0064980Z Installing dependencies from Pipfile.lock (611b50)...
2024-10-07T17:52:57.0215267Z Traceback (most recent call last):
2024-10-07T17:52:57.0231165Z File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/pipenv/patched/pip/_vendor/packaging/requirements.py", line 36, in init
2024-10-07T17:52:57.0254406Z parsed = _parse_requirement(requirement_string)
2024-10-07T17:52:57.0256364Z File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/pipenv/patched/pip/_vendor/packaging/_parser.py", line 62, in parse_requirement
2024-10-07T17:52:57.0257930Z return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))
2024-10-07T17:52:57.0260001Z File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/pipenv/patched/pip/_vendor/packaging/_parser.py", line 80, in _parse_requirement
2024-10-07T17:52:57.0261541Z url, specifier, marker = _parse_requirement_details(tokenizer)
2024-10-07T17:52:57.0263583Z File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/pipenv/patched/pip/_vendor/packaging/_parser.py", line 124, in _parse_requirement_details
2024-10-07T17:52:57.0265005Z marker = _parse_requirement_marker(
2024-10-07T17:52:57.0266610Z File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/pipenv/patched/pip/_vendor/packaging/_parser.py", line 145, in _parse_requirement_marker
2024-10-07T17:52:57.0268333Z tokenizer.raise_syntax_error(
2024-10-07T17:52:57.0269918Z File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/pipenv/patched/pip/_vendor/packaging/_tokenizer.py", line 167, in raise_syntax_error
2024-10-07T17:52:57.0271294Z raise ParserSyntaxError(
2024-10-07T17:52:57.0272643Z pipenv.patched.pip._vendor.packaging._tokenizer.ParserSyntaxError: Expected end or semicolon (after name and no valid version specifier)
2024-10-07T17:52:57.0273799Z tensorflow==~=2.13.0
2024-10-07T17:52:57.0274175Z ^
2024-10-07T17:52:57.0274378Z
2024-10-07T17:52:57.0274975Z The above exception was the direct cause of the following exception:
2024-10-07T17:52:57.0275535Z
2024-10-07T17:52:57.0275695Z Traceback (most recent call last):
2024-10-07T17:52:57.0278061Z File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/pipenv/patched/pip/_internal/req/constructors.py", line 362, in _parse_req_string
2024-10-07T17:52:57.0279464Z return get_requirement(req_as_string)
2024-10-07T17:52:57.0281022Z File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/pipenv/patched/pip/_internal/utils/packaging.py", line 45, in get_requirement
2024-10-07T17:52:57.0282532Z return Requirement(req_string)
2024-10-07T17:52:57.0284016Z File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/site-packages/pipenv/patched/pip/_vendor/packaging/requirements.py", line 38, in init
2024-10-07T17:52:57.0285429Z raise InvalidRequirement(str(e)) from e
2024-10-07T17:52:57.0286672Z pipenv.patched.pip._vendor.packaging.requirements.InvalidRequirement: Expected end or semicolon (after name and no valid version specifier)
2024-10-07T17:52:57.0287888Z tensorflow==~=2.13.0
2024-10-07T17:52:57.0288280Z ^
2024-10-07T17:52:57.0288484Z
2024-10-07T17:52:57.0288833Z During handling of the above exception, another exception occurred:
2024-10-07T17:52:57.0289366Z
2024-10-07T17:52:57.0289538Z Traceback (most recent call last):
2024-10-07T17:52:57.0290321Z File "/opt/hostedtoolcache/Python/3.10.15/x64/bin/pipenv", line 8, in