Hi folks ! I see a lot of discussions around dock...
# general
a
Hi folks ! I see a lot of discussions around docker and pex. Maybe someone can help me on the issue ? In a nutshell, when I use
docker_image
to run a pex with
platforms
specified, I get
/usr/bin/env: 'python3.9': No such file or directory
I have no idea where
3.9
comes from. I don't have it on my system, I use
3.10
everywhere in files and configurations.
f
I had this same problem too starting with 2.16.0. Here is a work around that worked for me. In
pants.toml
, tell pants to use your PYENV installs to run pex. It defaults to
"<PATH>"
Copy code
[pex]
executable_search_paths = ["<PYENV>"]
Then, where you build your PEX targets, override the default shebang line
Copy code
pex_binary(
    name="bin",
    entry_point="foo.bar.main",
    shebang="#!/usr/bin/env python3",
)
a
Thanks ! That worked 🙂