victorious-dress-47449
06/23/2025, 12:18 AM[python-bootstrap]
search_path = [
"%(env.FLOX_ENV)s/bin"
]
pants test, run
fails but pants export --py-resolve-format=symlinked_immutable_virtualenv
works fine. I also tried hardcoding the value of env.FLOX_ENV and it still didn't work. But using
[python-bootstrap]
search_path = [
"<PATH>"
]
works just fine. The error I get is "No interpreter compatible with the requested constraints was found:"fast-nail-55400
06/23/2025, 12:55 AMpants.toml
or BUILD
files? And what version of Python is stored at $FLOX_ENV/bin
. Pants and/or Pex probably sees the flox Python but is rejecting it as incompatible.victorious-dress-47449
06/23/2025, 12:58 AMinterpreter_constraints = ["==3.13.*"]
/Users/mfairley/jazmoai/jazmo/.flox/run/aarch64-darwin.jazmo.dev/bin/python --version
Python 3.13.3
I also think it's the only version available on my PATH so if it's not taking it from flox when using <PATH> then I don't know where it's coming from.fast-nail-55400
06/23/2025, 1:09 AMfast-nail-55400
06/23/2025, 1:10 AMfast-nail-55400
06/23/2025, 1:10 AM--keep-sandboxes=on_failure
and manually run the pex command which is not accepting the Python.fast-nail-55400
06/23/2025, 1:11 AMfast-nail-55400
06/23/2025, 1:11 AMvictorious-dress-47449
06/23/2025, 1:14 AM20:12:15.98 [INFO] pex: Resolving interpreters
pex: Resolving interpreters :: Searching for pyenv root...
pex: No pyenv installation was found.
I do have pyenv installed although I'm not using it in my flox environment. This suggests that pex is still relying on pyenv though. Perhaps I'm missing a setting somewhere to tell it to look for python elsewherevictorious-dress-47449
06/23/2025, 1:19 AMfast-nail-55400
06/23/2025, 1:40 AM<PYENV>
was included in search path. Let's verify your [python-bootstrap].search_path
option's actual value. Run pants help-advanced python-bootstrap
What does it say the value of search_path
is?
And maybe that error is skipped? If you set PEX_VERBOSE=9
you should get more logging (if invoking a preserved sandbox)victorious-dress-47449
06/23/2025, 1:42 AMsearch_path
default: [
"<PYENV>",
"<ASDF>",
"<PATH>"
]
current value: [
"/Users/mfairley/jazmoai/jazmo/.flox/run/aarch64-darwin.jazmo.dev/bin"
] (pants.toml)
fast-nail-55400
06/23/2025, 1:45 AM-ldebug
as well?fast-nail-55400
06/23/2025, 1:47 AMExamined the following interpreters
victorious-dress-47449
06/23/2025, 1:48 AMNo interpreters could be found on the system.
fast-nail-55400
06/23/2025, 1:49 AMls -l /Users/mfairley/jazmoai/jazmo/.flox/run/aarch64-darwin.jazmo.dev/bin
victorious-dress-47449
06/23/2025, 1:50 AMlrwxr-xr-x 1 root wheel 62 Dec 31 1969 /Users/mfairley/jazmoai/jazmo/.flox/run/aarch64-darwin.jazmo.dev/bin -> /nix/store/1a8xg8l3m67hxinxzzcsak9736qm9vsf-python3-3.13.3/bin
fast-nail-55400
06/23/2025, 1:50 AMbin
directory?victorious-dress-47449
06/23/2025, 1:51 AMflox [jazmo] ➜ jazmo git:(main) ✗ ls /nix/store/1a8xg8l3m67hxinxzzcsak9736qm9vsf-python3-3.13.3/bin
idle idle3 idle3.13 pydoc pydoc3 pydoc3.13 python python-config python3 python3-config python3.13 python3.13-config
fast-nail-55400
06/23/2025, 2:00 AMpython3.13
)fast-nail-55400
06/23/2025, 2:01 AMfast-nail-55400
06/23/2025, 2:01 AMfast-nail-55400
06/23/2025, 2:02 AMfast-nail-55400
06/23/2025, 2:03 AM__run.sh
file in the sandbox)victorious-dress-47449
06/23/2025, 2:04 AMsearch_path = [
"/nix/store/1a8xg8l3m67hxinxzzcsak9736qm9vsf-python3-3.13.3/bin/python3.13"
]
victorious-dress-47449
06/23/2025, 2:05 AM#!/usr/bin/env bash
# This command line should execute the same process as pants did internally.
cd /private/var/folders/lf/tr4gz0k514lf165m8gcg73yw0000gn/T/pants-sandbox-Bf8jUX
env -i CPPFLAGS='' LDFLAGS='' PATH=$'/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin' PEX_IGNORE_RCFILES=true PEX_PYTHON=/pants-named-caches/python_build_standalone/aa16a7a87faf96d6f8c534a20d60da226da7ea3319cb2a376363be3dbd48baba/bin/python3 PEX_ROOT=.cache/pex_root /pants-named-caches/python_build_standalone/aa16a7a87faf96d6f8c534a20d60da226da7ea3319cb2a376363be3dbd48baba/bin/python3 ./pex --tmpdir .tmp -vvvvvvvvv --no-emit-warnings --pip-version 24.2 --python-path /nix/store/1a8xg8l3m67hxinxzzcsak9736qm9vsf-python3-3.13.3/bin/python3.13 --interpreter-constraint $'CPython==3.13.*' -- -c $'import hashlib, os, sys\n\npython = os.path.realpath(sys.executable)\nprint(python)\n\nhasher = hashlib.sha256()\nwith open(python, "rb") as fp:\n for chunk in iter(lambda: fp.read(8192), b""):\n hasher.update(chunk)\nprint(hasher.hexdigest())\n'
victorious-dress-47449
06/23/2025, 2:05 AMenv -i PATH=/nix/store/1a8xg8l3m67hxinxzzcsak9736qm9vsf-python3-3.13.3/bin python
fast-nail-55400
06/23/2025, 2:06 AMPEX_VERBOSE=9
to that command in __run.sh
and run it, what's the full output?fast-nail-55400
06/23/2025, 2:07 AMfast-nail-55400
06/23/2025, 2:07 AMvictorious-dress-47449
06/23/2025, 2:09 AMbash __run.sh
env: /pants-named-caches/python_build_standalone/aa16a7a87faf96d6f8c534a20d60da226da7ea3319cb2a376363be3dbd48baba/bin/python3: No such file or directory
victorious-dress-47449
06/23/2025, 2:09 AMpants_version = "2.26.1"
victorious-dress-47449
06/23/2025, 2:09 AMfast-nail-55400
06/23/2025, 2:09 AMpants help pex-cli
will print the current configured Pex version.victorious-dress-47449
06/23/2025, 2:10 AMfast-nail-55400
06/23/2025, 2:11 AMdocker_environment
?victorious-dress-47449
06/23/2025, 2:11 AMfast-nail-55400
06/23/2025, 2:11 AMvictorious-dress-47449
06/23/2025, 2:12 AMfast-nail-55400
06/23/2025, 2:12 AMfast-nail-55400
06/23/2025, 2:12 AMpython_boostrap_search_path
as needed on the docker_environment
targetfast-nail-55400
06/23/2025, 2:13 AMfast-nail-55400
06/23/2025, 2:14 AMdocker_environment
.... I only noticed because I wrote the docker_environment
support and know that the /pants-named-caches
directory is where the Docker volume is mounted in the container ...victorious-dress-47449
06/23/2025, 2:15 AMfast-nail-55400
06/23/2025, 2:15 AMdocker_environment
victorious-dress-47449
06/23/2025, 2:16 AMfast-nail-55400
06/23/2025, 2:16 AM