InvalidRequirement - possible requirement parsing regression in 8.1.2
See original GitHub issue- Pip version: 8.1.2
- Python version: 2.7.11
- Operating System: Debian Jesse (official python:2.7 Docker image)
Description:
When trying to install the requirement appdynamics
I get the error below. This package has a requirements.txt
format which I have never seen before:
https://pypi.python.org/pypi/appdynamics/4.1.4.0
appdynamics-bindeps-linux-x86 (==4.1.4.0); 'linux' in sys_platform and platform_machine=='i386'
appdynamics-bindeps-linux-x64 (==4.1.4.0); 'linux' in sys_platform and (platform_machine=='x86_64' or platform_machine=='AMD64')
appdynamics-bindeps-osx-x86 (==4.1.4.0); sys_platform=='darwin' and platform_machine=='i386'
appdynamics-bindeps-osx-x64 (==4.1.4.0); sys_platform=='darwin' and (platform_machine=='x86_64' or platform_machine=='AMD64')
What I’ve run:
Error
docker run --rm -it python:2.7 bash
pip install appdynamics
Traceback
Invalid requirement: 'appdynamics-proxysupport-linux-x64==1.8.0.51; linux in "sys_platform" and (platform_machine == "x86_64" or platform_machine == "AMD64")'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 78, in __init__
req = Requirement(req)
File "/usr/local/lib/python2.7/site-packages/pip/_vendor/packaging/requirements.py", line 96, in __init__
requirement_string[e.loc:e.loc + 8]))
InvalidRequirement: Invalid requirement, parse error at "'; linux '"
No Error
docker run --rm -it python:2.7 bash
pip install --upgrade pip==8.1.1
pip install appdynamics # works
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Invalid requirement, parse error" error after updating a python ...
This is caused by an issue in setuptools==20.2.1 which is pulled in by IPython ( setuptools>.. ), so a pip install -U updated...
Read more >InvalidRequirement with Python pip 8.1.2 - Google Groups
InvalidRequirement : Invalid requirement, parse error at "'; linux '". when I try to install plover. It works when I downgrade to pip...
Read more >Bug #1611503 “[SRU] python3-lxc breaks pip3 freeze in Xenial ...
[Regression Potential] ... The package will build now and be available at ... InvalidRequirement: Invalid requirement, parse error at "'-lxc==0.'".
Read more >Changelog - pip documentation v22.3.1
Raise RequirementsFileParseError when parsing malformed requirements options that can't be sucessfully parsed by shlex. (#11491).
Read more >pip Documentation - Read the Docs
2 Beginning with pip v1.5.1, get-pip.py stopped requiring setuptools ... To list outdated packages, and show the latest version available:.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I guess we need to add support to packaging for this quirk, if packages are relying on it. Yay. :\ (Though trust anything @dstufft says over me.)
For Plover at least, the ‘in’ syntax is what is broken, so using
"win" == sys_platform
instead of"win" in sys_platform
works.