I ran into an issue with BinaryNotFoundError when ...
# general
i
I ran into an issue with BinaryNotFoundError when running in our self-hosted runner (we haven't successfully done this before)
Copy code
./pantsv2 --version
10
Bootstrapping Pants using /__w/_tool/Python/3.9.12/x64/bin/python3.9
11
Creating the virtualenv PEX.
12
Downloading the Pex PEX.
13
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
14
                                 Dload  Upload   Total   Spent    Left  Speed
15

16
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
17
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
18
100   640  100   640    0     0   1576      0 --:--:-- --:--:-- --:--:--  1572
19

20
100 3529k  100 3529k    0     0  5505k      0 --:--:-- --:--:-- --:--:-- 5505k
21
SHA256 fingerprint of <https://github.com/pantsbuild/pex/releases/download/v2.1.42/pex> verified.
22
/github/home/.pex/unzipped_pexes/478cc1fa371ca40aa3e7dafee735ca438d4a243f/.deps/pex-2.1.42-py2.py3-none-any.whl/pex/tools/commands/venv.py:141: PEXWarning: Encountered collision building venv at /github/home/.pex/venvs/short/be58481f from /github/home/.pex/pip.pex/46820cb5af0dcf9295a4e7f30184cc0e9fa063dc:
23
1. /github/home/.pex/venvs/ac552154f06e1771cbadfe56b66e41ce437f5a6f/17eb8d319fb1d70fcb861bec9928522e67aed499.282422e08bdc485a85ddd8ed64260959/lib/python3.9/site-packages/constraints.txt was provided by:
24
	/github/home/.pex/pip.pex/46820cb5af0dcf9295a4e7f30184cc0e9fa063dc/.deps/setuptools/constraints.txt
25
	/github/home/.pex/pip.pex/46820cb5af0dcf9295a4e7f30184cc0e9fa063dc/.deps/wheel/constraints.txt
26
  pex_warnings.warn(message)
27
Installing pantsbuild.pants==2.9.0 into a virtual environment at /github/home/.cache/pants/setup/bootstrap-Linux-x86_64/2.9.0_py39
28
created virtual environment CPython3.9.12.final.0-64 in 301ms
29
  creator CPython3Posix(dest=/github/home/.cache/pants/setup/bootstrap-Linux-x86_64/pants.usIdLq/install, clear=False, no_vcs_ignore=False, global=False)
30
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/github/home/.local/share/virtualenv)
31
    added seed packages: pip==21.1.2, setuptools==57.0.0, wheel==0.36.2
32
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
33
Requirement already satisfied: pip in /github/home/.cache/pants/setup/bootstrap-Linux-x86_64/pants.usIdLq/install/lib/python3.9/site-packages (21.1.2)
34
Collecting pip
35
  Downloading pip-22.0.4-py3-none-any.whl (2.1 MB)
36
Installing collected packages: pip
37
  Attempting uninstall: pip
38
    Found existing installation: pip 21.1.2
39
    Uninstalling pip-21.1.2:
40
      Successfully uninstalled pip-21.1.2
41
Successfully installed pip-22.0.4
42
Collecting pantsbuild.pants==2.9.0
43
  Downloading pantsbuild.pants-2.9.0-cp39-cp39-manylinux2014_x86_64.whl (43.5 MB)
44
Collecting packaging==21.0
45
  Downloading packaging-21.0-py3-none-any.whl (40 kB)
46
Collecting types-PyYAML==5.4.3
47
  Downloading types_PyYAML-5.4.3-py2.py3-none-any.whl (12 kB)
48
Collecting types-setuptools==57.0.0
49
  Downloading types_setuptools-57.0.0-py3-none-any.whl (4.8 kB)
50
Collecting psutil==5.8.0
51
  Downloading psutil-5.8.0-cp39-cp39-manylinux2010_x86_64.whl (293 kB)
52
Collecting setproctitle==1.2.2
53
  Downloading setproctitle-1.2.2-cp39-cp39-manylinux1_x86_64.whl (35 kB)
54
Collecting ansicolors==1.1.8
55
  Downloading ansicolors-1.1.8-py2.py3-none-any.whl (13 kB)
56
Collecting humbug==0.2.7
57
  Downloading humbug-0.2.7-py3-none-any.whl (11 kB)
58
Collecting fasteners==0.16.3
59
  Downloading fasteners-0.16.3-py2.py3-none-any.whl (28 kB)
60
Collecting types-toml==0.1.3
61
  Downloading types_toml-0.1.3-py2.py3-none-any.whl (2.1 kB)
62
Collecting PyYAML<7.0,>=6.0
63
  Downloading PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (661 kB)
64
Requirement already satisfied: setuptools<58.0,>=56.0.0 in /github/home/.cache/pants/setup/bootstrap-Linux-x86_64/pants.usIdLq/install/lib/python3.9/site-packages (from pantsbuild.pants==2.9.0) (57.0.0)
65
Collecting typing-extensions==3.10.0.2
66
  Downloading typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)
67
Collecting pex==2.1.61
68
  Downloading pex-2.1.61-py2.py3-none-any.whl (2.6 MB)
69
Collecting ijson==3.1.4
70
  Downloading ijson-3.1.4-cp39-cp39-manylinux2010_x86_64.whl (131 kB)
71
Collecting toml==0.10.2
72
  Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
73
Collecting six
74
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
75
Collecting requests
76
  Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
77
Collecting pyparsing>=2.0.2
78
  Downloading pyparsing-3.0.8-py3-none-any.whl (98 kB)
79
Collecting idna<4,>=2.5
80
  Downloading idna-3.3-py3-none-any.whl (61 kB)
81
Collecting charset-normalizer~=2.0.0
82
  Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
83
Collecting certifi>=2017.4.17
84
  Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
85
Collecting urllib3<1.27,>=1.21.1
86
  Downloading urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
87
Installing collected packages: typing-extensions, types-toml, types-setuptools, types-PyYAML, ijson, certifi, ansicolors, urllib3, toml, six, setproctitle, PyYAML, pyparsing, psutil, pex, idna, charset-normalizer, requests, packaging, fasteners, humbug, pantsbuild.pants
88
Successfully installed PyYAML-6.0 ansicolors-1.1.8 certifi-2021.10.8 charset-normalizer-2.0.12 fasteners-0.16.3 humbug-0.2.7 idna-3.3 ijson-3.1.4 packaging-21.0 pantsbuild.pants-2.9.0 pex-2.1.61 psutil-5.8.0 pyparsing-3.0.8 requests-2.27.1 setproctitle-1.2.2 six-1.16.0 toml-0.10.2 types-PyYAML-5.4.3 types-setuptools-57.0.0 types-toml-0.1.3 typing-extensions-3.10.0.2 urllib3-1.26.9
89
New virtual environment successfully created at /github/home/.cache/pants/setup/bootstrap-Linux-x86_64/2.9.0_py39.
90
2.9.0
91
./pantsv2 update-build-files --check
92
Error: 6.25 [ERROR] 1 Exception encountered:
93

94
  BinaryNotFoundError: Was not able to locate a Python interpreter to execute rule code.
95
Please ensure that Python is available in one of the locations identified by `[python-bootstrap] search_path`, which currently expands to:
96
  ['/__w/_tool/Python/3.9.12/x64/bin', '/__w/_tool/Python/3.9.12/x64', '/__w/_tool/node/14.19.1/x64/bin', '/github/home/go/bin', '/__w/_tool/go/1.17.7/x64/bin', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin']
97

98
make: *** [Makefile:26: pants-check-build-files] Error 1
99
Error: Process completed with exit code 2.
bootstrap seems to have found python 3.9.12 which is what is installed w/ the
setup-python
action. We're using a debian 11.2 image.
h