Troubleshooting PEX files

02-10-2025

Windows symlink support:

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:

Platform specification errors (ABI3):

  • https://github.com/pyca/cryptography/issues/13394
    • make sure to specify the correct abi and platform versions when building the PEX file (check the requirements on the server)
  • 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
  • glibc dependency
    • cryptography-45.0.6-cp311-abi3-manylinux_2_34_x86_64.whl - not compatible with glibc 2.28
    • cryptography-45.0.6-cp311-abi3-manylinux_2_28_x86_64.whl
      • cp311-abi3 - works with python 3.11, 3.12, and newer (ABI3 = forward compatible)
      • manylinux_2_28 - glibc 2.28
      • x86_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.