icy-hair-30586
05/02/2022, 7:07 AMpex_binary(
name="app_binary",
execution_mode="venv",
dependencies=[
":app",
"3rdparty/python:uvicorn", # This isn't imported anywhere, so dependency inference doesn't find it.
],
entry_point="main.py",
platforms=["linux_x86_64-cp-3.8.13-cp38m"],
interpreter_constraints=["==3.8.13"]
)
but when I build the image and try to run it, the error is
/app_binary.pex
/usr/bin/env: 'python3.10': No such file or directory
my expectation was that the shebang would pick an interpreter that matches the constraints.
Besides setting shebang explicitly, how can I ensure a proper interpreter gets picked?enough-analyst-54434
05/02/2022, 3:52 PMinterpreter_constraints=["==3.8.13"]
since Pants actually ignores it in this case and instead set the shebang
, possibly to shebang="/usr/bin/env python3.8"
.