Skip to content

Generated Pex File works on some hosts, not others #2120

Answered by jsirois
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, that is a pretty naive command as it stands. You nowhere nail down the Python(s) you're building for. That is done with --python or --complete-platform (--platform is a lossy version of --complete-platform that should probably be avoided). So, what you get now is the PEX will only guaranteed-work for the Python that hosts the pex console script on then machine you build the PEX file on (and the associated glibc version).

To see more what is going on try unzip -qc ./bin/my-product.pex PEX-INFO | jq . (or build your PEX file with --include-tools or --venv and use PEX_TOOLS=1 ./bin/my-product.pex info --indent 2).

You'll see a map of distributions that represent all the ~wheels your PEX …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ghost
Comment options

@jsirois
Comment options

Answer selected
@jsirois
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant