Troubleshooting PEX files
02-10-2025
Windows symlink support:
- solution is to run as admin or enable developer mode (but this is sometimes not possible)
- https://github.com/pex-tool/pex/issues/2658
- https://github.com/pex-tool/pex/issues/2659
Failed to spawn a job for DownloadTarget(target=LocalInterpreter('C:\\Users\\lmiloszewski\\dev_programs\\python\\3.12.2\\python.exe'), universal_target=None): [WinError None] A required privilege is not held by the client: '..\\11e52...\\setuptools-68.0.0-py3-none-any.whl' -> 'C:\\Users\\lmiloszewski\\AppData\\Local\\pex\\Cache\\installed_wheels\\0\\1a659...lck.work\\setuptools-68.0.0-py3-none-any.whl'Incompatable python interpreter on the host machine:
Failed to find compatible interpreter on path /sbin:/bin:/usr/sbin:/usr/bin.
Examined the following interpreters:
1.) /usr/bin/python3.12 CPython==3.12.11
2.) /usr/libexec/platform-python3.6 CPython==3.6.8
3.) /usr/bin/python3.11 CPython==3.11.13
4.) /usr/bin/python3.9 CPython==3.9.20
No interpreter compatible with the requested constraints was found:
Failed to resolve requirements from PEX environment @ SSL issues:
-
using PEX's native implementation to resolve and download packages throws SSL connection errors
- this is related to python 3.13 being used to boostrap the env, and the fact that python 3.13 has stricter SSL constraints which fail within the internal network
-
resorted to building the wheelhouse manually
-
make sure to test this using the relevant environment variables for uv (reference Nexus) and httpx (reference CA certs)
-
requests:REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-bundle.crt -
httpx:SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt
Platform naming conventions:
- built distribution which replaces the egg format (ready-to-install)
{dist}-{version}(-{build})?-{python}-{abi}-{platform}.whl- example =
cryptography-2.9.2-cp35-abi3-macosx_10_9_x86_64.whl - version = https://peps.python.org/pep-0440/
- python = https://peps.python.org/pep-0425/
- abi = https://docs.python.org/3/c-api/stable.html
- example =
Platform specification errors (ABI3):
- https://github.com/pyca/cryptography/issues/13394
- make sure to specify the correct
abiandplatformversions when building the PEX file (check the requirements on the server)
- make sure to specify the correct
- ABI3 (Stable ABI) wheels are forward-compatible:
- cp37-abi3 works with Python 3.7, 3.8, 3.9, 3.10, 3.11, and 3.12
- cp311-abi3 works with Python 3.11 and 3.12
glibcdependencycryptography-45.0.6-cp311-abi3-manylinux_2_34_x86_64.whl- not compatible with glibc 2.28cryptography-45.0.6-cp311-abi3-manylinux_2_28_x86_64.whlcp311-abi3- works with python 3.11, 3.12, and newer (ABI3 = forward compatible)manylinux_2_28- glibc 2.28x86_64- architecture
[admlmiloszewski@lddevfiorcdc1 ai]$ ldd --version ldd (GNU libc) 2.28 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper.