Repository: pex-tool/pex

Issue:
Invalid requirement, parse error at "'python_v'
I get the following output when running the pex file:
```
Traceback (most recent call last):
  File "/app/file.pex/.bootstrap/pex/vendor/_vendored/setuptools/pkg_resources/_vendor/packaging/requirements.py", line 106, in __init__
  File "/app/file.pex/.bootstrap/pex/vendor/_vendored/setuptools/pkg_resources/_vendor/pyparsing.py", line 1654, in parseString
  File "/app/file.pex/.bootstrap/pex/vendor/_vendored/setuptools/pkg_resources/_vendor/pyparsing.py", line 1644, in parseString
  File "/app/file.pex/.bootstrap/pex/vendor/_vendored/setuptools/pkg_resources/_vendor/pyparsing.py", line 1402, in _parseNoCache
  File "/app/file.pex/.bootstrap/pex/vendor/_vendored/setuptools/pkg_resources/_vendor/pyparsing.py", line 3417, in parseImpl
  File "/app/file.pex/.bootstrap/pex/vendor/_vendored/setuptools/pkg_resources/_vendor/pyparsing.py", line 1406, in _parseNoCache
  File "/app/file.pex/.bootstrap/pex/vendor/_vendored/setuptools/pkg_resources/_vendor/pyparsing.py", line 3205, in parseImpl
pex.vendor._vendored.setuptools.pkg_resources._vendor.pyparsing.ParseException: Expected stringEnd (at char 29), (line:1, col:30)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/file.pex/.bootstrap/pex/vendor/_vendored/setuptools/pkg_resources/__init__.py", line 3133, in __init__
  File "/app/file.pex/.bootstrap/pex/vendor/_vendored/setuptools/pkg_resources/_vendor/packaging/requirements.py", line 110, in __init__
pex.vendor._vendored.setuptools.pkg_resources.extern.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'python_v'"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/file.pex/.bootstrap/pex/pex.py", line 394, in execute
  File "/app/file.pex/.bootstrap/pex/pex.py", line 92, in _activate
  File "/app/file.pex/.bootstrap/pex/environment.py", line 239, in activate
  File "/app/file.pex/.bootstrap/pex/environment.py", line 405, in _activate
  File "/app/file.pex/.bootstrap/pex/environment.py", line 405, in <listcomp>
  File "/app/file.pex/.bootstrap/pex/vendor/_vendored/setuptools/pkg_resources/__init__.py", line 3180, in parse
  File "/app/file.pex/.bootstrap/pex/vendor/_vendored/setuptools/pkg_resources/__init__.py", line 3126, in parse_requirements
  File "/app/file.pex/.bootstrap/pex/vendor/_vendored/setuptools/pkg_resources/__init__.py", line 3135, in __init__
pex.vendor._vendored.setuptools.pkg_resources.RequirementParseError: Invalid requirement, parse error at "'python_v'"
```
I build the pex file in python:3.6.10-slim-buster docker container, and run it in a python:3.6.10-slim-buster docker container as well.

Has anyone seen this error before? Please advice.


Discussion:
Can you please either provide the command line that generated the PEX file, or, probably better, attach it's PEX-INFO file? For an example of doing the latter:
```
$ unzip -qc dist/pex PEX-INFO
{"always_write_cache": false, "build_properties": {"class": "PyPy", "pex_version": "2.1.7", "platform": "manylinux2014_x86_64", "version": [2, 7, 13]}, "code_hash": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "distributions": {"pex-2.1.7-py2.py3-none-any.whl": "000649440107fde66dc4772a773dfe7a63fd936e"}, "emit_warnings": true, "entry_point": "pex.bin.pex:main", "ignore_errors": false, "inherit_path": "false", "interpreter_constraints": [">=2.7,<3.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"], "pex_path": null, "requirements": ["pex==2.1.7; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version < \"3.9\" and python_version >= \"2.7\""], "strip_pex_env": false, "unzip": true, "zip_safe": true}
```
In that example the ./dist/pex file is a PEX of Pex itself, but this will work for any PEX file.
Thank-you for quick response @jsirois 
output of `unzip -qc file.pex PEX-INFO`
```
{"always_write_cache": false, "build_properties": {"class": "CPython", "pex_version": "2.1.7", "platform": "manylinux2014_x86_64", "version": [3, 6, 10]}, "code_hash": "1fc7a4b6fdf96f7d422eedbd3f5bf55d703bc195", "distributions": {"Faker-4.0.0-py3-none-any.whl": "a0a217b4441e061057e55ffebf16a9281fcb5589", "Flask-1.1.1-py2.py3-none-any.whl": "3cf953e0eba69e7c69887d06d322e100ed6d7f2d", "Flask_Bcrypt-0.7.1-py3-none-any.whl": "5772864f448c76bc54459a146579c834f9e47c14", "Flask_Cors-3.0.8-py2.py3-none-any.whl": "fa5e0927e2abc6fba0d270067a6d9cf8415b7353", "Flask_JWT_Extended-3.23.0-py2.py3-none-any.whl": "54f50301df04806df0d41d747bbf6e959b337706", "Flask_Migrate-2.5.2-py2.py3-none-any.whl": "7dad4b7398067264a2cadb0604ac5ab8fddf5b13", "Flask_RESTful-0.3.7-py2.py3-none-any.whl": "a09ec629902bc8ec4e0614a00670722fe983b6fa", "Flask_SQLAlchemy-2.4.0-py2.py3-none-any.whl": "e3cac73f4329c301d2aaa6f07cd4f32379e2afd5", "Jinja2-2.11.1-py2.py3-none-any.whl": "36b8657cdcf10c5da40ecbb65527075ed5c2625d", "Keras_Applications-1.0.8-py3-none-any.whl": "4a3844e4584efc7b604070781fa3966ed0549f86", "Keras_Preprocessing-1.1.0-py2.py3-none-any.whl": "eea4389be0653f3aecae4e54ff629125ff6ceed5", "Mako-1.1.2-py2.py3-none-any.whl": "7f7c973092f8d778231dd85679ecc602be35e1d1", "Markdown-3.2.1-py2.py3-none-any.whl": "ef24cfa05438b06887f67fa7e6b0cada3b0be0ff", "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl": "a2bbfdd3712949798286d95ae748f089cb111826", "Pillow-6.1.0-cp36-cp36m-manylinux1_x86_64.whl": "1962c7dbd2476c06451034d0c83c9d11633f5463", "PyJWT-1.7.1-py2.py3-none-any.whl": "558ceace119f2ea713691701fb4bc61d64d40f55", "SQLAlchemy-1.3.15-cp36-cp36m-linux_x86_64.whl": "ff93e1c9f29659ce57916f6d75e184d4fa896c17", "Werkzeug-1.0.0-py2.py3-none-any.whl": "238bd42f9044920cc491bbb7cb50381a6d88586f", "absl_py-0.9.0-py3-none-any.whl": "19667c3fa849673c37ae382d443b97476d8d8a6c", "alembic-1.4.2-py2.py3-none-any.whl": "bec78ce12b1196028136cf081142ee5097b52fdc", "aniso8601-8.0.0-py2.py3-none-any.whl": "a5e59551c1cb1a9f8c5c600c3e1f189e796f6fef", "astor-0.8.1-py2.py3-none-any.whl": "3f429c60766092a8661b317c5cb803230090e3c7", "bcrypt-3.1.7-cp34-abi3-manylinux1_x86_64.whl": "daa636c615fdf0e695fa7ea7508e1925048e4617", "blinker-1.4-py3-none-any.whl": "b6a3c2a53b33270c2970c061b2ae640e03e0831d", "boto3-1.9.231-py2.py3-none-any.whl": "4c93734f45f0baf94cdb5fb3ce6f21feaaed9810", "botocore-1.12.253-py2.py3-none-any.whl": "7d3205f518609b0cb645c3fcb3fa5b1e14b6ebba", "cachetools-4.0.0-py3-none-any.whl": "51f43b8b0e6d489be68d4edc76a871af2cedc95d", "certifi-2019.11.28-py2.py3-none-any.whl": "401465263cf18478ba38ec149226b80719a72339", "cffi-1.14.0-cp36-cp36m-manylinux1_x86_64.whl": "67978da8bd78e479f0bd07d45a246cf2508ae1be", "chardet-3.0.4-py2.py3-none-any.whl": "c2a93b6d7106bfa882c432bf898567a042fd0d4e", "click-7.1.1-py2.py3-none-any.whl": "ce30600edca3e95f4746a1d035d17f758842fb2c", "cloudpickle-1.3.0-py2.py3-none-any.whl": "c3750c9e7172ca870c68e510e07b1277fd48f82f", "cx_Oracle-7.2.2-cp36-cp36m-manylinux1_x86_64.whl": "d0d82a881278e6b0066b1a2e2f4b825d69068608", "cycler-0.10.0-py2.py3-none-any.whl": "e5f66229e7cb6c33db26a90eb4429d4d964f7d0b", "dataclasses-0.6-py3-none-any.whl": "4942d49ca06cf2b496398adedf0447df3a8bed03", "decorator-4.4.2-py2.py3-none-any.whl": "a39764c5860f8844b13681b2f1513aaa97f3b754", "docutils-0.15.2-py3-none-any.whl": "d69f593174ddd386dd1e3a2f14c30801f9fcd590", "gast-0.2.2-py3-none-any.whl": "8ba99b3a954b6dd7ce7e1da91bdfc8a41d7b4967", "google_auth-1.12.0-py2.py3-none-any.whl": "9d7a2058f24794db7318afbb1a294f694ee70600", "google_auth_oauthlib-0.4.1-py2.py3-none-any.whl": "174869852ca92e8d637e0050fae414c5d612ab3b", "google_pasta-0.2.0-py3-none-any.whl": "2525fb038fa8dd9178ae147f5393e7e11b17ce56", "grpcio-1.27.2-cp36-cp36m-manylinux2010_x86_64.whl": "5a9e5e93e0ebf1a9befcff9ab2ef36971522461d", "gunicorn-20.0.4-py2.py3-none-any.whl": "8819cb928296439bca30df75515452dc81045cf6", "h5py-2.10.0-cp36-cp36m-manylinux1_x86_64.whl": "320d5956c47494bc6f494b4e30adc6b4d6d18694", "idna-2.9-py2.py3-none-any.whl": "17874ccb364b6c5b47bdbb1b6d8b241435bfbcfe", "itsdangerous-1.1.0-py2.py3-none-any.whl": "b5e3186c6aecea4cd66fd463c9545e12c84c80db", "jmespath-0.9.5-py2.py3-none-any.whl": "a0cedab0d2b64ece167a8984540d463a52c76c61", "joblib-0.14.1-py2.py3-none-any.whl": "45def876eb0dc23e88aee16a983f6e1a4102ece7", "kiwisolver-1.1.0-cp36-cp36m-manylinux1_x86_64.whl": "e0757f2a535307420cd99508730157f64cfed8d7", "matplotlib-3.1.2-cp36-cp36m-manylinux1_x86_64.whl": "299f888236f0a998121f7ad20739b1d41c749c15", "mysqlclient-1.4.4-cp36-cp36m-linux_x86_64.whl": "b0ce9b110b3d6296890b38c81516d190a2123447", "numpy-1.18.1-cp36-cp36m-manylinux1_x86_64.whl": "a3f9cc38ca64b85e4426b0fd671c67e58344e404", "oauthlib-3.1.0-py2.py3-none-any.whl": "fdb0f31a8640fcc0cbdd28c5f085e53fa65c6783", "opt_einsum-3.2.0-py3-none-any.whl": "6d3c81ba0c835ee4631ac110e31ac2da9630606a", "pandas-0.25.3-cp36-cp36m-manylinux1_x86_64.whl": "eace46c7bea119de181b519fffebbd6a0ef46f8a", "patsy-0.5.1-py2.py3-none-any.whl": "c646c422b6b3fe88583b609cfb08c1f93fc1703a", "protobuf-3.11.3-cp36-cp36m-manylinux1_x86_64.whl": "774a5bd659ad3ac5c490de4839ba732c91513d1e", "psycopg2_binary-2.8.3-cp36-cp36m-manylinux1_x86_64.whl": "f4eefe816de636ddda0fa2b170a443c0687b24cf", "pyasn1-0.4.8-py2.py3-none-any.whl": "ac9a2cd741525125a859bf229f5c4a88ca5fd07e", "pyasn1_modules-0.2.8-py2.py3-none-any.whl": "7f7f2d0a29b7dbf7f60f51e2dab6014408d072f9", "pycparser-2.20-py2.py3-none-any.whl": "4bf5fb0f6540ca05cb505b5bba08c37043075a90", "pyemd-0.5.1-cp36-cp36m-linux_x86_64.whl": "f07d7d1a6a8649060ed2cbb102aed63a79f5666f", "pymongo-3.9.0-cp36-cp36m-manylinux1_x86_64.whl": "7bbccab0d728d6471928f26eb95f81861523a918", "pyodbc-4.0.27-cp36-cp36m-linux_x86_64.whl": "7e7b84bf0c7007213f20b5a0510fa4b2203ef6ea", "pyparsing-2.4.6-py2.py3-none-any.whl": "637cdceefbb809116551b53bfbdbc4170247cd36", "python_dateutil-2.8.1-py2.py3-none-any.whl": "847c63a588506943fe53acf5a16c502ce06da50e", "python_editor-1.0.4-py3-none-any.whl": "3c91fb3c8188d9dcdda9f39e43136e8172c57566", "pytz-2019.3-py2.py3-none-any.whl": "81e170aa27bd63ff3664e5b4e5f4ec409b0e998c", "requests-2.23.0-py2.py3-none-any.whl": "5a5391a0d4858402ffabba10f3c8444de332269f", "requests_oauthlib-1.3.0-py2.py3-none-any.whl": "195f7782fa5ce9b94b29fcaff19d85b539217831", "rsa-4.0-py2.py3-none-any.whl": "a4a53ff30df76eb96c356ea6985dfdcfa7aac818", "s3transfer-0.2.1-py2.py3-none-any.whl": "44f66b09d83408050c9eaedace40f79d9438203e", "scikit_learn-0.22.1-cp36-cp36m-manylinux1_x86_64.whl": "cf9ff3d67cfa8b7f73e16697416428cf2a159f53", "scipy-1.4.1-cp36-cp36m-manylinux1_x86_64.whl": "5355b8426d83f0f99445e5d5025640028e0b29b0", "seaborn-0.10.0-py3-none-any.whl": "dd13514f13594b43be9ee8161f3e04b847386387", "sentry_sdk-0.12.1-py2.py3-none-any.whl": "fe61dc149c9592d5d316d6a8e28e590c8474b110", "setuptools-46.1.3-py3-none-any.whl": "4d4232be194792cf9eaca8bff0f927bc92eeb8cd", "simplejson-3.17.0-cp36-cp36m-linux_x86_64.whl": "f26bbe5f5b39109740e4266634f2719c79c0375d", "six-1.14.0-py2.py3-none-any.whl": "6416d6145f6717f2ccbcc7d921014816fdc436e6", "statsmodels-0.11.0-cp36-cp36m-manylinux1_x86_64.whl": "a29690bfc55f338ae34e4f80b6b8b81d2a97d667", "tensorboard-2.1.1-py3-none-any.whl": "0096b6a209f5e183efa4e4d4dde887ef68f9007d", "tensorflow-2.1.0-cp36-cp36m-manylinux2010_x86_64.whl": "5f3a38d9411c86ca9a6ba6979b8a662372214893", "tensorflow_estimator-2.1.0-py2.py3-none-any.whl": "b446ec4ea9a91983a2fad0196bb5d60f4298638a", "tensorflow_probability-0.9.0-py2.py3-none-any.whl": "88b79bc086d4a974f306ca0877b3944bd868d85f", "termcolor-1.1.0-py3-none-any.whl": "00d8ecd400cc85801b7f3f37cba65adaed5c28ce", "text_unidecode-1.3-py2.py3-none-any.whl": "8f2e8b7f28a00d3874b9ca547a6a1e6f98d0ad46", "urllib3-1.25.8-py2.py3-none-any.whl": "90289c8bc0db5aad524c9958aa630f4c971c7ece", "wheel-0.34.2-py2.py3-none-any.whl": "989964443de7cd46001ae9acd8d89bec6e1fd8d1", "wrapt-1.12.1-cp36-cp36m-linux_x86_64.whl": "16545958b0e346ba2fc473b28ba0fdb64216de03", "xlrd-1.2.0-py2.py3-none-any.whl": "5b197a00b1e359e08623a449185fd004b7b8a554"}, "emit_warnings": true, "entry_point": "gunicorn.app.wsgiapp:run", "ignore_errors": false, "inherit_path": "false", "interpreter_constraints": [], "pex_path": null, "requirements": ["Faker==4.0.0; python_version >= \"3.4\"", "Flask-Bcrypt==0.7.1", "Flask-Cors==3.0.8", "Flask-JWT-Extended==3.23.0", "Flask-Migrate==2.5.2", "Flask-RESTful==0.3.7", "Flask-SQLAlchemy==2.4.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "Flask==1.1.1; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version >= \"2.7\"", "Jinja2==2.11.1; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version >= \"2.7\"", "Keras-Applications==1.0.8", "Keras-Preprocessing==1.1.0", "Mako==1.1.2; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "Markdown==3.2.1; python_version >= \"3.5\"", "MarkupSafe==1.1.1; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "Pillow==6.1.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version >= \"2.7\"", "PyJWT==1.7.1", "SQLAlchemy==1.3.15; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "Werkzeug==1.0.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version >= \"2.7\"", "absl-py==0.9.0", "alembic==1.4.2; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "aniso8601==8.0.0", "astor==0.8.1; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "bcrypt==3.1.7; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "blinker==1.4", "boto3==1.9.231", "botocore==1.12.253", "cachetools==4.0.0; python_version ~= \"3.5\"", "certifi==2019.11.28", "cffi==1.14.0", "chardet==3.0.4", "click==7.1.1; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version >= \"2.7\"", "cloudpickle==1.3.0", "cx-Oracle==7.2.2", "cycler==0.10.0", "dataclasses==0.6", "decorator==4.4.2; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version >= \"2.6\"", "docutils==0.15.2; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version >= \"2.6\"", "gast==0.2.2; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "google-auth-oauthlib==0.4.1", "google-auth==1.12.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "google-pasta==0.2.0", "grpcio==1.27.2", "gunicorn==20.0.4; python_version >= \"3.4\"", "h5py==2.10.0", "idna==2.9; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "itsdangerous==1.1.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "jmespath==0.9.5", "joblib==0.14.1", "kiwisolver==1.1.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "matplotlib==3.1.2; python_version >= \"3.6\"", "mysqlclient==1.4.4", "numpy==1.18.1; python_version >= \"3.5\"", "oauthlib==3.1.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "opt-einsum==3.2.0; python_version >= \"3.5\"", "pandas==0.25.3; python_version >= \"3.5.3\"", "patsy==0.5.1", "protobuf==3.11.3", "psycopg2-binary==2.8.3; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "pyasn1-modules==0.2.8", "pyasn1==0.4.8", "pycparser==2.20; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "pyemd==0.5.1", "pymongo==3.9.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "pyodbc==4.0.27", "pyparsing==2.4.6; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version >= \"2.6\"", "python-dateutil==2.8.1; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version >= \"2.7\" and python_version >= \"2.7\"", "python-editor==1.0.4", "pytz==2019.3", "requests-oauthlib==1.3.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"", "requests==2.23.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version >= \"2.7\"", "rsa==4.0", "s3transfer==0.2.1", "scikit-learn==0.22.1; python_version >= \"3.5\"", "scipy==1.4.1; python_version >= \"3.5\" and python_version >= \"3\"", "seaborn==0.10.0; python_version >= \"3.6\"", "sentry-sdk==0.12.1", "setuptools==46.1.3; python_version >= \"3.5\"", "simplejson==3.17.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version >= \"2.5\"", "six==1.14.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version >= \"2.7\"", "statsmodels==0.11.0", "tensorboard==2.1.1; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version >= \"2.7\"", "tensorflow-estimator==2.1.0", "tensorflow-probability==0.9.0", "tensorflow==2.1.0", "termcolor==1.1.0", "text-unidecode==1.3", "urllib3==1.25.8; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version < \"4\" and python_version >= \"2.7\" and python_version >= \"3.4\"", "wheel==0.34.2; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version >= \"2.7\" and python_version >= \"3\" and python_version >= \"3\"", "wrapt==1.12.1", "xlrd==1.2.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\""], "strip_pex_env": true, "zip_safe": true}
```
Can you please try to repro what I've done here? I do not get any parse error.

1st I copied and pasted the json above into a local `/tmp/PEX-INFO` file. Then I ran:
```
$ docker run --rm -it -v /tmp/PEX-INFO:/PEX-INFO:ro python:3.6.10-slim-buster bash -i
root@1af400b61b9b:/# apt update && apt install -y curl jq unzip
root@1af400b61b9b:/# jq . /PEX-INFO 
{
  "always_write_cache": false,
  "build_properties": {
    "class": "CPython",
    "pex_version": "2.1.7",
    "platform": "manylinux2014_x86_64",
    "version": [
      3,
      6,
      10
    ]
  },
  "code_hash": "1fc7a4b6fdf96f7d422eedbd3f5bf55d703bc195",
  "distributions": {
    "Faker-4.0.0-py3-none-any.whl": "a0a217b4441e061057e55ffebf16a9281fcb5589",
    "Flask-1.1.1-py2.py3-none-any.whl": "3cf953e0eba69e7c69887d06d322e100ed6d7f2d",
    "Flask_Bcrypt-0.7.1-py3-none-any.whl": "5772864f448c76bc54459a146579c834f9e47c14",
    "Flask_Cors-3.0.8-py2.py3-none-any.whl": "fa5e0927e2abc6fba0d270067a6d9cf8415b7353",
    "Flask_JWT_Extended-3.23.0-py2.py3-none-any.whl": "54f50301df04806df0d41d747bbf6e959b337706",
    "Flask_Migrate-2.5.2-py2.py3-none-any.whl": "7dad4b7398067264a2cadb0604ac5ab8fddf5b13",
    "Flask_RESTful-0.3.7-py2.py3-none-any.whl": "a09ec629902bc8ec4e0614a00670722fe983b6fa",
    "Flask_SQLAlchemy-2.4.0-py2.py3-none-any.whl": "e3cac73f4329c301d2aaa6f07cd4f32379e2afd5",
    "Jinja2-2.11.1-py2.py3-none-any.whl": "36b8657cdcf10c5da40ecbb65527075ed5c2625d",
    "Keras_Applications-1.0.8-py3-none-any.whl": "4a3844e4584efc7b604070781fa3966ed0549f86",
    "Keras_Preprocessing-1.1.0-py2.py3-none-any.whl": "eea4389be0653f3aecae4e54ff629125ff6ceed5",
    "Mako-1.1.2-py2.py3-none-any.whl": "7f7c973092f8d778231dd85679ecc602be35e1d1",
    "Markdown-3.2.1-py2.py3-none-any.whl": "ef24cfa05438b06887f67fa7e6b0cada3b0be0ff",
    "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl": "a2bbfdd3712949798286d95ae748f089cb111826",
    "Pillow-6.1.0-cp36-cp36m-manylinux1_x86_64.whl": "1962c7dbd2476c06451034d0c83c9d11633f5463",
    "PyJWT-1.7.1-py2.py3-none-any.whl": "558ceace119f2ea713691701fb4bc61d64d40f55",
    "SQLAlchemy-1.3.15-cp36-cp36m-linux_x86_64.whl": "ff93e1c9f29659ce57916f6d75e184d4fa896c17",
    "Werkzeug-1.0.0-py2.py3-none-any.whl": "238bd42f9044920cc491bbb7cb50381a6d88586f",
    "absl_py-0.9.0-py3-none-any.whl": "19667c3fa849673c37ae382d443b97476d8d8a6c",
    "alembic-1.4.2-py2.py3-none-any.whl": "bec78ce12b1196028136cf081142ee5097b52fdc",
    "aniso8601-8.0.0-py2.py3-none-any.whl": "a5e59551c1cb1a9f8c5c600c3e1f189e796f6fef",
    "astor-0.8.1-py2.py3-none-any.whl": "3f429c60766092a8661b317c5cb803230090e3c7",
    "bcrypt-3.1.7-cp34-abi3-manylinux1_x86_64.whl": "daa636c615fdf0e695fa7ea7508e1925048e4617",
    "blinker-1.4-py3-none-any.whl": "b6a3c2a53b33270c2970c061b2ae640e03e0831d",
    "boto3-1.9.231-py2.py3-none-any.whl": "4c93734f45f0baf94cdb5fb3ce6f21feaaed9810",
    "botocore-1.12.253-py2.py3-none-any.whl": "7d3205f518609b0cb645c3fcb3fa5b1e14b6ebba",
    "cachetools-4.0.0-py3-none-any.whl": "51f43b8b0e6d489be68d4edc76a871af2cedc95d",
    "certifi-2019.11.28-py2.py3-none-any.whl": "401465263cf18478ba38ec149226b80719a72339",
    "cffi-1.14.0-cp36-cp36m-manylinux1_x86_64.whl": "67978da8bd78e479f0bd07d45a246cf2508ae1be",
    "chardet-3.0.4-py2.py3-none-any.whl": "c2a93b6d7106bfa882c432bf898567a042fd0d4e",
    "click-7.1.1-py2.py3-none-any.whl": "ce30600edca3e95f4746a1d035d17f758842fb2c",
    "cloudpickle-1.3.0-py2.py3-none-any.whl": "c3750c9e7172ca870c68e510e07b1277fd48f82f",
    "cx_Oracle-7.2.2-cp36-cp36m-manylinux1_x86_64.whl": "d0d82a881278e6b0066b1a2e2f4b825d69068608",
    "cycler-0.10.0-py2.py3-none-any.whl": "e5f66229e7cb6c33db26a90eb4429d4d964f7d0b",
    "dataclasses-0.6-py3-none-any.whl": "4942d49ca06cf2b496398adedf0447df3a8bed03",
    "decorator-4.4.2-py2.py3-none-any.whl": "a39764c5860f8844b13681b2f1513aaa97f3b754",
    "docutils-0.15.2-py3-none-any.whl": "d69f593174ddd386dd1e3a2f14c30801f9fcd590",
    "gast-0.2.2-py3-none-any.whl": "8ba99b3a954b6dd7ce7e1da91bdfc8a41d7b4967",
    "google_auth-1.12.0-py2.py3-none-any.whl": "9d7a2058f24794db7318afbb1a294f694ee70600",
    "google_auth_oauthlib-0.4.1-py2.py3-none-any.whl": "174869852ca92e8d637e0050fae414c5d612ab3b",
    "google_pasta-0.2.0-py3-none-any.whl": "2525fb038fa8dd9178ae147f5393e7e11b17ce56",
    "grpcio-1.27.2-cp36-cp36m-manylinux2010_x86_64.whl": "5a9e5e93e0ebf1a9befcff9ab2ef36971522461d",
    "gunicorn-20.0.4-py2.py3-none-any.whl": "8819cb928296439bca30df75515452dc81045cf6",
    "h5py-2.10.0-cp36-cp36m-manylinux1_x86_64.whl": "320d5956c47494bc6f494b4e30adc6b4d6d18694",
    "idna-2.9-py2.py3-none-any.whl": "17874ccb364b6c5b47bdbb1b6d8b241435bfbcfe",
    "itsdangerous-1.1.0-py2.py3-none-any.whl": "b5e3186c6aecea4cd66fd463c9545e12c84c80db",
    "jmespath-0.9.5-py2.py3-none-any.whl": "a0cedab0d2b64ece167a8984540d463a52c76c61",
    "joblib-0.14.1-py2.py3-none-any.whl": "45def876eb0dc23e88aee16a983f6e1a4102ece7",
    "kiwisolver-1.1.0-cp36-cp36m-manylinux1_x86_64.whl": "e0757f2a535307420cd99508730157f64cfed8d7",
    "matplotlib-3.1.2-cp36-cp36m-manylinux1_x86_64.whl": "299f888236f0a998121f7ad20739b1d41c749c15",
    "mysqlclient-1.4.4-cp36-cp36m-linux_x86_64.whl": "b0ce9b110b3d6296890b38c81516d190a2123447",
    "numpy-1.18.1-cp36-cp36m-manylinux1_x86_64.whl": "a3f9cc38ca64b85e4426b0fd671c67e58344e404",
    "oauthlib-3.1.0-py2.py3-none-any.whl": "fdb0f31a8640fcc0cbdd28c5f085e53fa65c6783",
    "opt_einsum-3.2.0-py3-none-any.whl": "6d3c81ba0c835ee4631ac110e31ac2da9630606a",
    "pandas-0.25.3-cp36-cp36m-manylinux1_x86_64.whl": "eace46c7bea119de181b519fffebbd6a0ef46f8a",
    "patsy-0.5.1-py2.py3-none-any.whl": "c646c422b6b3fe88583b609cfb08c1f93fc1703a",
    "protobuf-3.11.3-cp36-cp36m-manylinux1_x86_64.whl": "774a5bd659ad3ac5c490de4839ba732c91513d1e",
    "psycopg2_binary-2.8.3-cp36-cp36m-manylinux1_x86_64.whl": "f4eefe816de636ddda0fa2b170a443c0687b24cf",
    "pyasn1-0.4.8-py2.py3-none-any.whl": "ac9a2cd741525125a859bf229f5c4a88ca5fd07e",
    "pyasn1_modules-0.2.8-py2.py3-none-any.whl": "7f7f2d0a29b7dbf7f60f51e2dab6014408d072f9",
    "pycparser-2.20-py2.py3-none-any.whl": "4bf5fb0f6540ca05cb505b5bba08c37043075a90",
    "pyemd-0.5.1-cp36-cp36m-linux_x86_64.whl": "f07d7d1a6a8649060ed2cbb102aed63a79f5666f",
    "pymongo-3.9.0-cp36-cp36m-manylinux1_x86_64.whl": "7bbccab0d728d6471928f26eb95f81861523a918",
    "pyodbc-4.0.27-cp36-cp36m-linux_x86_64.whl": "7e7b84bf0c7007213f20b5a0510fa4b2203ef6ea",
    "pyparsing-2.4.6-py2.py3-none-any.whl": "637cdceefbb809116551b53bfbdbc4170247cd36",
    "python_dateutil-2.8.1-py2.py3-none-any.whl": "847c63a588506943fe53acf5a16c502ce06da50e",
    "python_editor-1.0.4-py3-none-any.whl": "3c91fb3c8188d9dcdda9f39e43136e8172c57566",
    "pytz-2019.3-py2.py3-none-any.whl": "81e170aa27bd63ff3664e5b4e5f4ec409b0e998c",
    "requests-2.23.0-py2.py3-none-any.whl": "5a5391a0d4858402ffabba10f3c8444de332269f",
    "requests_oauthlib-1.3.0-py2.py3-none-any.whl": "195f7782fa5ce9b94b29fcaff19d85b539217831",
    "rsa-4.0-py2.py3-none-any.whl": "a4a53ff30df76eb96c356ea6985dfdcfa7aac818",
    "s3transfer-0.2.1-py2.py3-none-any.whl": "44f66b09d83408050c9eaedace40f79d9438203e",
    "scikit_learn-0.22.1-cp36-cp36m-manylinux1_x86_64.whl": "cf9ff3d67cfa8b7f73e16697416428cf2a159f53",
    "scipy-1.4.1-cp36-cp36m-manylinux1_x86_64.whl": "5355b8426d83f0f99445e5d5025640028e0b29b0",
    "seaborn-0.10.0-py3-none-any.whl": "dd13514f13594b43be9ee8161f3e04b847386387",
    "sentry_sdk-0.12.1-py2.py3-none-any.whl": "fe61dc149c9592d5d316d6a8e28e590c8474b110",
    "setuptools-46.1.3-py3-none-any.whl": "4d4232be194792cf9eaca8bff0f927bc92eeb8cd",
    "simplejson-3.17.0-cp36-cp36m-linux_x86_64.whl": "f26bbe5f5b39109740e4266634f2719c79c0375d",
    "six-1.14.0-py2.py3-none-any.whl": "6416d6145f6717f2ccbcc7d921014816fdc436e6",
    "statsmodels-0.11.0-cp36-cp36m-manylinux1_x86_64.whl": "a29690bfc55f338ae34e4f80b6b8b81d2a97d667",
    "tensorboard-2.1.1-py3-none-any.whl": "0096b6a209f5e183efa4e4d4dde887ef68f9007d",
    "tensorflow-2.1.0-cp36-cp36m-manylinux2010_x86_64.whl": "5f3a38d9411c86ca9a6ba6979b8a662372214893",
    "tensorflow_estimator-2.1.0-py2.py3-none-any.whl": "b446ec4ea9a91983a2fad0196bb5d60f4298638a",
    "tensorflow_probability-0.9.0-py2.py3-none-any.whl": "88b79bc086d4a974f306ca0877b3944bd868d85f",
    "termcolor-1.1.0-py3-none-any.whl": "00d8ecd400cc85801b7f3f37cba65adaed5c28ce",
    "text_unidecode-1.3-py2.py3-none-any.whl": "8f2e8b7f28a00d3874b9ca547a6a1e6f98d0ad46",
    "urllib3-1.25.8-py2.py3-none-any.whl": "90289c8bc0db5aad524c9958aa630f4c971c7ece",
    "wheel-0.34.2-py2.py3-none-any.whl": "989964443de7cd46001ae9acd8d89bec6e1fd8d1",
    "wrapt-1.12.1-cp36-cp36m-linux_x86_64.whl": "16545958b0e346ba2fc473b28ba0fdb64216de03",
    "xlrd-1.2.0-py2.py3-none-any.whl": "5b197a00b1e359e08623a449185fd004b7b8a554"
  },
  "emit_warnings": true,
  "entry_point": "gunicorn.app.wsgiapp:run",
  "ignore_errors": false,
  "inherit_path": "false",
  "interpreter_constraints": [],
  "pex_path": null,
  "requirements": [
    "Faker==4.0.0; python_version >= \"3.4\"",
    "Flask-Bcrypt==0.7.1",
    "Flask-Cors==3.0.8",
    "Flask-JWT-Extended==3.23.0",
    "Flask-Migrate==2.5.2",
    "Flask-RESTful==0.3.7",
    "Flask-SQLAlchemy==2.4.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "Flask==1.1.1; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version >= \"2.7\"",
    "Jinja2==2.11.1; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version >= \"2.7\"",
    "Keras-Applications==1.0.8",
    "Keras-Preprocessing==1.1.0",
    "Mako==1.1.2; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "Markdown==3.2.1; python_version >= \"3.5\"",
    "MarkupSafe==1.1.1; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "Pillow==6.1.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version >= \"2.7\"",
    "PyJWT==1.7.1",
    "SQLAlchemy==1.3.15; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "Werkzeug==1.0.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version >= \"2.7\"",
    "absl-py==0.9.0",
    "alembic==1.4.2; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "aniso8601==8.0.0",
    "astor==0.8.1; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "bcrypt==3.1.7; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "blinker==1.4",
    "boto3==1.9.231",
    "botocore==1.12.253",
    "cachetools==4.0.0; python_version ~= \"3.5\"",
    "certifi==2019.11.28",
    "cffi==1.14.0",
    "chardet==3.0.4",
    "click==7.1.1; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version >= \"2.7\"",
    "cloudpickle==1.3.0",
    "cx-Oracle==7.2.2",
    "cycler==0.10.0",
    "dataclasses==0.6",
    "decorator==4.4.2; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version >= \"2.6\"",
    "docutils==0.15.2; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version >= \"2.6\"",
    "gast==0.2.2; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "google-auth-oauthlib==0.4.1",
    "google-auth==1.12.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "google-pasta==0.2.0",
    "grpcio==1.27.2",
    "gunicorn==20.0.4; python_version >= \"3.4\"",
    "h5py==2.10.0",
    "idna==2.9; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "itsdangerous==1.1.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "jmespath==0.9.5",
    "joblib==0.14.1",
    "kiwisolver==1.1.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "matplotlib==3.1.2; python_version >= \"3.6\"",
    "mysqlclient==1.4.4",
    "numpy==1.18.1; python_version >= \"3.5\"",
    "oauthlib==3.1.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "opt-einsum==3.2.0; python_version >= \"3.5\"",
    "pandas==0.25.3; python_version >= \"3.5.3\"",
    "patsy==0.5.1",
    "protobuf==3.11.3",
    "psycopg2-binary==2.8.3; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "pyasn1-modules==0.2.8",
    "pyasn1==0.4.8",
    "pycparser==2.20; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "pyemd==0.5.1",
    "pymongo==3.9.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "pyodbc==4.0.27",
    "pyparsing==2.4.6; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version >= \"2.6\"",
    "python-dateutil==2.8.1; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version >= \"2.7\" and python_version >= \"2.7\"",
    "python-editor==1.0.4",
    "pytz==2019.3",
    "requests-oauthlib==1.3.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\"",
    "requests==2.23.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version >= \"2.7\"",
    "rsa==4.0",
    "s3transfer==0.2.1",
    "scikit-learn==0.22.1; python_version >= \"3.5\"",
    "scipy==1.4.1; python_version >= \"3.5\" and python_version >= \"3\"",
    "seaborn==0.10.0; python_version >= \"3.6\"",
    "sentry-sdk==0.12.1",
    "setuptools==46.1.3; python_version >= \"3.5\"",
    "simplejson==3.17.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version >= \"2.5\"",
    "six==1.14.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version >= \"2.7\"",
    "statsmodels==0.11.0",
    "tensorboard==2.1.1; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version >= \"2.7\"",
    "tensorflow-estimator==2.1.0",
    "tensorflow-probability==0.9.0",
    "tensorflow==2.1.0",
    "termcolor==1.1.0",
    "text-unidecode==1.3",
    "urllib3==1.25.8; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version < \"4\" and python_version >= \"2.7\" and python_version >= \"3.4\"",
    "wheel==0.34.2; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version != \"3.4.*\" and python_version >= \"2.7\" and python_version >= \"3\" and python_version >= \"3\"",
    "wrapt==1.12.1",
    "xlrd==1.2.0; python_version != \"3.0.*\" and python_version != \"3.1.*\" and python_version != \"3.2.*\" and python_version != \"3.3.*\" and python_version >= \"2.7\""
  ],
  "strip_pex_env": true,
  "zip_safe": true
}
root@1af400b61b9b:/# curl -O -sSL https://github.com/pantsbuild/pex/releases/download/v2.1.7/pex
root@1af400b61b9b:/# chmod +x pex
root@1af400b61b9b:/# PEX_INTERPRETER=1 ./pex 
Python 3.6.10 (default, Mar 31 2020, 16:33:25) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from pex.third_party import pkg_resources
>>> from pex.pex_info import PexInfo
>>> with open('/PEX-INFO') as fp:
...   pex_info = PexInfo.from_json(fp.read())
... 
>>> for req in pex_info.requirements:
...   pkg_resources.Requirement.parse(req)
... 
Requirement.parse('Faker==4.0.0; python_version >= "3.4"')
Requirement.parse('Flask-Bcrypt==0.7.1')
Requirement.parse('Flask-Cors==3.0.8')
Requirement.parse('Flask-JWT-Extended==3.23.0')
Requirement.parse('Flask-Migrate==2.5.2')
Requirement.parse('Flask-RESTful==0.3.7')
Requirement.parse('Flask-SQLAlchemy==2.4.0; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('Flask==1.1.1; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version != "3.4.*" and python_version >= "2.7"')
Requirement.parse('Jinja2==2.11.1; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version != "3.4.*" and python_version >= "2.7"')
Requirement.parse('Keras-Applications==1.0.8')
Requirement.parse('Keras-Preprocessing==1.1.0')
Requirement.parse('Mako==1.1.2; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('Markdown==3.2.1; python_version >= "3.5"')
Requirement.parse('MarkupSafe==1.1.1; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('Pillow==6.1.0; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version != "3.4.*" and python_version >= "2.7"')
Requirement.parse('PyJWT==1.7.1')
Requirement.parse('SQLAlchemy==1.3.15; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('Werkzeug==1.0.0; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version != "3.4.*" and python_version >= "2.7"')
Requirement.parse('absl-py==0.9.0')
Requirement.parse('alembic==1.4.2; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('aniso8601==8.0.0')
Requirement.parse('astor==0.8.1; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('bcrypt==3.1.7; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('blinker==1.4')
Requirement.parse('boto3==1.9.231')
Requirement.parse('botocore==1.12.253')
Requirement.parse('cachetools==4.0.0; python_version ~= "3.5"')
Requirement.parse('certifi==2019.11.28')
Requirement.parse('cffi==1.14.0')
Requirement.parse('chardet==3.0.4')
Requirement.parse('click==7.1.1; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version != "3.4.*" and python_version >= "2.7"')
Requirement.parse('cloudpickle==1.3.0')
Requirement.parse('cx-Oracle==7.2.2')
Requirement.parse('cycler==0.10.0')
Requirement.parse('dataclasses==0.6')
Requirement.parse('decorator==4.4.2; python_version != "3.0.*" and python_version != "3.1.*" and python_version >= "2.6"')
Requirement.parse('docutils==0.15.2; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version >= "2.6"')
Requirement.parse('gast==0.2.2; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('google-auth-oauthlib==0.4.1')
Requirement.parse('google-auth==1.12.0; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('google-pasta==0.2.0')
Requirement.parse('grpcio==1.27.2')
Requirement.parse('gunicorn==20.0.4; python_version >= "3.4"')
Requirement.parse('h5py==2.10.0')
Requirement.parse('idna==2.9; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('itsdangerous==1.1.0; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('jmespath==0.9.5')
Requirement.parse('joblib==0.14.1')
Requirement.parse('kiwisolver==1.1.0; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('matplotlib==3.1.2; python_version >= "3.6"')
Requirement.parse('mysqlclient==1.4.4')
Requirement.parse('numpy==1.18.1; python_version >= "3.5"')
Requirement.parse('oauthlib==3.1.0; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('opt-einsum==3.2.0; python_version >= "3.5"')
Requirement.parse('pandas==0.25.3; python_version >= "3.5.3"')
Requirement.parse('patsy==0.5.1')
Requirement.parse('protobuf==3.11.3')
Requirement.parse('psycopg2-binary==2.8.3; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('pyasn1-modules==0.2.8')
Requirement.parse('pyasn1==0.4.8')
Requirement.parse('pycparser==2.20; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('pyemd==0.5.1')
Requirement.parse('pymongo==3.9.0; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('pyodbc==4.0.27')
Requirement.parse('pyparsing==2.4.6; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version >= "2.6"')
Requirement.parse('python-dateutil==2.8.1; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version >= "2.7" and python_version >= "2.7"')
Requirement.parse('python-editor==1.0.4')
Requirement.parse('pytz==2019.3')
Requirement.parse('requests-oauthlib==1.3.0; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
Requirement.parse('requests==2.23.0; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version != "3.4.*" and python_version >= "2.7"')
Requirement.parse('rsa==4.0')
Requirement.parse('s3transfer==0.2.1')
Requirement.parse('scikit-learn==0.22.1; python_version >= "3.5"')
Requirement.parse('scipy==1.4.1; python_version >= "3.5" and python_version >= "3"')
Requirement.parse('seaborn==0.10.0; python_version >= "3.6"')
Requirement.parse('sentry-sdk==0.12.1')
Requirement.parse('setuptools==46.1.3; python_version >= "3.5"')
Requirement.parse('simplejson==3.17.0; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version >= "2.5"')
Requirement.parse('six==1.14.0; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version >= "2.7"')
Requirement.parse('statsmodels==0.11.0')
Requirement.parse('tensorboard==2.1.1; python_version != "3.0.*" and python_version != "3.1.*" and python_version >= "2.7"')
Requirement.parse('tensorflow-estimator==2.1.0')
Requirement.parse('tensorflow-probability==0.9.0')
Requirement.parse('tensorflow==2.1.0')
Requirement.parse('termcolor==1.1.0')
Requirement.parse('text-unidecode==1.3')
Requirement.parse('urllib3==1.25.8; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version != "3.4.*" and python_version < "4" and python_version >= "2.7" and python_version >= "3.4"')
Requirement.parse('wheel==0.34.2; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version != "3.4.*" and python_version >= "2.7" and python_version >= "3" and python_version >= "3"')
Requirement.parse('wrapt==1.12.1')
Requirement.parse('xlrd==1.2.0; python_version != "3.0.*" and python_version != "3.1.*" and python_version != "3.2.*" and python_version != "3.3.*" and python_version >= "2.7"')
>>> 
```

Is there any chance you can upload attach the pex file?
Ok so, when i copied the result i got for PEX-INFO into my comment above, I excluded one of the requirements which is a private python package developed internally by the company I work at. 

When that python package requirement is removed from PEX-INFO file, I am able to reproduce result as above, however, if i keep the private python package (used internally at company) in PEX-INFO i get the parse error at "python_v"

Any ideas why this might happen?
> Any ideas why this might happen?

None unless it's obvious from that requirement line. Can you paste that string from the json in PEX-INFO?
For more context from what I can guess. Requirements in the PEX-INFO json are being parsed by `pkg_resources` (from `setuptools` from pypa using the `packaging` project from pypa) according to https://www.python.org/dev/peps/pep-0508/#complete-grammar. The `python_v` bit _looks_ like a partial "environment marker" which come after a semicolon; e.g.: `setuptools==46.1.3; python_version >= "3.5"`. If you have a bogus line like so: `proprietary_distribution==1.2.3; python_v ..."`, then parsing would blow up and that should be expected from https://www.python.org/dev/peps/pep-0508 since `python_v` is not a valid environment marker key (`python_version` is).
This is the line in requirement of PEX-INFO which is causing problems:
`"<package_name>===1.0.2-fba4511; python_version >= \"3.6\""`
As you can see, there are 3 equal signs between package_name and version.
Not sure why this is the case. Where does this come from? The <package_name> line in requirements.txt file used to install deps for the pex package has only 2 = signs.
Many thanks
Does pex support arbitrary equality requirements?:
https://www.python.org/dev/peps/pep-0440/#arbitrary-equality
That seems to be my situation, where package_name has an arbitrary requirement.
Pex vendors Pip 20.0 and delegates all resolution to it: https://github.com/pantsbuild/pex/tree/master/pex/vendor/_vendored/pip

If Pip can install that package with ===, then Pex should be able to. If not, then no dice. Also if not, are you using === to work around non-standard versions in your project? If so, can you fix that?
Ah, this is specifically setuptools (pkg_resources) that chokes. It can handle ===, but not === combined with an env marker.
@dgkatz getting back to this and digging further.

1st the observation that given an arbitrary equality requirement (`===`), pypa/packaging purposely treats _everything_ to the right of the `===` as the version. Since `===` is intended as a (discouraged) escape hatch to support unsupported version formats, this makes sense. As such, not recognizing `; ...` as delimiting an environment marker.

Now, on to:
1. Why is `===` present at all?
2. Why is the environment marker present?

As to 1: Neither Pex nor the libraries that it vendors injects `===` in place of `==` AFAICT. This implies that even though your requirements.txt says `==` you must have a transitive dependency that asks for `===`. Is it possible for you to confirm this?

As to 2: I think this code is tacking on the environment marker which is ultimately leading to the parse failure:
https://github.com/pantsbuild/pex/blob/b51b340bea8a585a246997071a815d008986d6e3/pex/resolver.py#L109-L128

That's a bug for `===` version specifiers afaict and I'll fix that.
having encountered similar issues, problem exists from release 2.1.7 to 2.1.15

i had to downgrade my pex to 2.1.6 to solve it :(

Resolving patch:
diff --git a/pex/resolver.py b/pex/resolver.py
--- a/pex/resolver.py
+++ b/pex/resolver.py
@@ -109,6 +109,19 @@ def __init__(self, markers_by_requirement_key):
     def to_requirement(self, dist):
         req = dist.as_requirement()
 
+        # pkg_resources.Distribution.as_requirement returns requirements in one of two forms:
+        # 1.) project_name==version
+        # 2.) project_name===version
+        # The latter form is used whenever the distribution's version is non-standard. In those
+        # cases we cannot append environment markers since `===` indicates a raw version string to
+        # the right that should not be parsed and instead should be compared literally in full.
+        # See:
+        # + https://www.python.org/dev/peps/pep-0440/#arbitrary-equality
+        # + https://github.com/pantsbuild/pex/issues/940
+        operator, _ = req.specs[0]
+        if operator == "===":
+            return req
+
         markers = OrderedSet()
 
         # Here we map any wheel python requirement to the equivalent environment marker:


Test patch:
diff --git a/pex/testing.py b/pex/testing.py
--- a/pex/testing.py
+++ b/pex/testing.py
@@ -110,6 +110,7 @@ def make_project(
     install_reqs=None,  # type: Optional[List[str]]
     extras_require=None,  # type: Optional[Dict[str, List[str]]]
     entry_points=None,  # type: Optional[Union[str, Dict[str, List[str]]]]
+    python_requires=None,  # type: Optional[str]
 ):
     # type: (...) -> Iterator[str]
     project_content = {
@@ -130,6 +131,7 @@ def make_project(
             install_requires=%(install_requires)r,
             extras_require=%(extras_require)r,
             entry_points=%(entry_points)r,
+            python_requires=%(python_requires)r,
             )
             """
         ),
@@ -148,6 +150,7 @@ def make_project(
         "install_requires": install_reqs or [],
         "extras_require": extras_require or {},
         "entry_points": entry_points or {},
+        "python_requires": python_requires,
     }
 
     with temporary_content(project_content, interp=interp) as td:
@@ -190,6 +193,7 @@ def built_wheel(
     install_reqs=None,  # type: Optional[List[str]]
     extras_require=None,  # type: Optional[Dict[str, List[str]]]
     interpreter=None,  # type: Optional[PythonInterpreter]
+    python_requires=None,  # type: Optional[str]
     **kwargs  # type: Any
 ):
     # type: (...) -> Iterator[str]
@@ -199,6 +203,7 @@ def built_wheel(
         zip_safe=zip_safe,
         install_reqs=install_reqs,
         extras_require=extras_require,
+        python_requires=python_requires,
     ) as td:
         builder = WheelBuilder(td, interpreter=interpreter, **kwargs)
         yield builder.bdist()
diff --git a/tests/test_integration.py b/tests/test_integration.py
--- a/tests/test_integration.py
+++ b/tests/test_integration.py
@@ -2348,9 +2348,13 @@ def create_platform_pex(args):
 @pytest.fixture
 def tmp_workdir():
     # type: () -> Iterator[str]
+    cwd = os.getcwd()
     with temporary_dir() as tmpdir:
         os.chdir(tmpdir)
-        yield os.path.realpath(tmpdir)
+        try:
+            yield os.path.realpath(tmpdir)
+        finally:
+            os.chdir(cwd)
 
 
 def test_tmpdir_absolute(tmp_workdir):
@@ -2393,3 +2397,19 @@ def test_tmpdir_file(tmp_workdir):
     result.assert_failure()
     assert tmpdir_file in result.error
     assert "is not a directory" in result.error
+
+
+def test_resolve_arbitrary_equality_issues_940():
+    # type: () -> None
+    with temporary_dir() as tmpdir, built_wheel(
+        name="foo",
+        version="1.0.2-fba4511",
+        python_requires=">=2.7,<=3.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*",
+    ) as whl:
+        pex_file = os.path.join(tmpdir, "pex")
+        results = run_pex_command(args=["-o", pex_file, whl])
+        results.assert_success()
+
+        stdout, returncode = run_simple_pex(pex_file, args=["-c", "import foo"])
+        assert returncode == 0
+        assert stdout == b""
diff --git a/tests/test_resolver.py b/tests/test_resolver.py
--- a/tests/test_resolver.py
+++ b/tests/test_resolver.py
@@ -507,3 +507,18 @@ def test_install_invalid_local_distribution():
         install(
             [LocalDistribution.create(project1_wheel, fingerprint=valid_local_sdist.fingerprint)]
         )
+
+
+def test_resolve_arbitrary_equality_issues_940():
+    # type: () -> None
+    dist = create_sdist(
+        name="foo",
+        version="1.0.2-fba4511",
+        python_requires=">=2.7,<=3.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*",
+    )
+    resolved_distributions = local_resolve_multi(requirements=[dist])
+
+    assert len(resolved_distributions) == 1
+    requirement = resolved_distributions[0].requirement
+    assert [("===", "1.0.2-fba4511")] == requirement.specs
+    assert requirement.marker is None