<#2077 Unable to build .pex file across a large ra...
# github-notifications
q
#2077 Unable to build .pex file across a large range of python versions with frozen requirements Issue created by shubin-yb We have run into an issue when trying to build a pex file across a large range of python versions, where a dependency given via our "requirements_frozen.txt" file does not handle the range of python versions we want support. For example:
Copy code
$ pex --python=python3.6 --python=python3.8 --python=python3.11 'grpcio==1.48.2' -o my.pex
...
  distutils.errors.CompileError: command '/usr/lib64/ccache/gcc' failed with exit code 1
  
  ----------------------------------------
  ERROR: Failed building wheel for grpcio
ERROR: Failed to build one or more wheels
As a work around, we can specify a range of grpcio versions to fix the issue; 'grpio>=1.48.2'. But that can leads to non-reproducible builds, which we want to avoid. is it possible to specify a different requirement.txt file to be used for a given version of python? A basic idea would be to allow something like
pex --python=python3.6 --python=python3.8 --python=python3.11 --mapped_requirement="{'3.6': 'grpcio==1.48.2', '3.8': 'grpcio==1.48.2', '3.1': 'grpcio==1.51.3'}"
Thanks! pantsbuild/pex