rapid-bird-79300
01/11/2022, 9:48 PMpsutil/_psutil_osx.cpython-39-darwin.so
. See this gist for more debug info.
We followed directions in https://www.pantsbuild.org/v2.7/docs/installation#macos but no luck. We tried removing the library and installing it directly but still having the same issue. Any help is greatly appreciated!enough-analyst-54434
01/11/2022, 9:59 PM'/Users/jjli/.cache/pants/setup/bootstrap-Darwin-arm64/pants.6KPRax/install/lib/python3.9/site-packages/psutil/_psutil_osx.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))
So you tried the arch -x86_64 pants
advice here and no dice?: https://www.pantsbuild.org/docs/prerequisitesenough-analyst-54434
01/11/2022, 10:00 PMancient-vegetable-10556
01/11/2022, 10:29 PM/opt/homebrew
?rapid-bird-79300
01/11/2022, 10:37 PM/opt/homebrew/bin/brew
ancient-vegetable-10556
01/11/2022, 10:37 PMancient-vegetable-10556
01/11/2022, 10:38 PMrapid-bird-79300
01/11/2022, 10:40 PM/Users/jjli/.pyenv/shims:/Users/jjli/.pyenv/shims:/Users/jjli/.pyenv/shims:/Users/jjli/.nvm/versions/node/v12.19.1/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/jjli/.pyenv/shims:/Users/jjli/.pyenv/bin:/Users/jjli/.pyenv/shims:/Users/jjli/.pyenv/bin:/Users/jjli/.pyenv/shims:/Users/jjli/.poetry/bin:/Users/jjli/.pyenv/shims:/Users/jjli/.pyenv/bin:/Users/jjli/.pyenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki:/Library/Apple/usr/bin
ancient-vegetable-10556
01/11/2022, 10:41 PMancient-vegetable-10556
01/11/2022, 10:41 PMrapid-bird-79300
01/11/2022, 10:43 PMancient-vegetable-10556
01/11/2022, 10:43 PMancient-vegetable-10556
01/11/2022, 10:44 PMchrisjrn@chrisjrns-MacBook-Pro pants % lipo -info ~/.pyenv/versions/3.8.12/bin/python
Non-fat file: /Users/chrisjrn/.pyenv/versions/3.8.12/bin/python is architecture: x86_64
ancient-vegetable-10556
01/11/2022, 10:45 PMchrisjrn@chrisjrns-MacBook-Pro pants % lipo -info /opt/homebrew/bin/python3
Non-fat file: /opt/homebrew/bin/python3 is architecture: arm64
rapid-bird-79300
01/11/2022, 10:53 PMjjli@jingjings-mbp ~/rippling-main master ? lipo -info ~/.pyenv/versions/3.9.5/bin/python ✔ 1393 14:50:05
Non-fat file: /Users/jjli/.pyenv/versions/3.9.5/bin/python is architecture: arm64
it seems just 3.9.5
and system version is installed.ancient-vegetable-10556
01/11/2022, 11:54 PMrefined-addition-53644
01/24/2022, 10:16 AMarm64
.refined-addition-53644
01/24/2022, 11:27 AMalacritty
as the terminal emulator. When you run uname -m
in this terminal, it shows x86_64
instead of arm64
and hence the pants bootstrap path was broken
PANTS_BOOTSTRAP="${PANTS_SETUP_CACHE}/bootstrap-$(uname -s)-$(uname -m)
But now even after switching back to default mac terminal where uname -s
returns arm64
, it's still failing. We are still debugging...ancient-vegetable-10556
01/24/2022, 4:19 PMrefined-addition-53644
01/24/2022, 4:33 PMniklas.hildebrandt@Niklass-MBP pyfleet % ./pants --version
Bootstrapping Pants using /opt/homebrew/bin/python3.9
Creating the virtualenv PEX.
Downloading the Pex PEX.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 640 100 640 0 0 5025 0 --:--:-- --:--:-- --:--:-- 5161
100 3529k 100 3529k 0 0 2622k 0 0:00:01 0:00:01 --:--:-- 4976k
SHA256 fingerprint of <https://github.com/pantsbuild/pex/releases/download/v2.1.42/pex> verified.
Installing pantsbuild.pants==2.9.0 into a virtual environment at /Users/niklas.hildebrandt/.cache/pants/setup/bootstrap-Darwin-arm64/2.9.0_py39
created virtual environment CPython3.9.10.final.0-64 in 145ms
creator CPython3Posix(dest=/Users/niklas.hildebrandt/.cache/pants/setup/bootstrap-Darwin-arm64/pants.JSvioR/install, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/niklas.hildebrandt/Library/Application Support/virtualenv)
added seed packages: pip==21.1.2, setuptools==57.0.0, wheel==0.36.2
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Requirement already satisfied: pip in /Users/niklas.hildebrandt/.cache/pants/setup/bootstrap-Darwin-arm64/pants.JSvioR/install/lib/python3.9/site-packages (21.1.2)
Collecting pip
Using cached pip-21.3.1-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.1.2
Uninstalling pip-21.1.2:
Successfully uninstalled pip-21.1.2
Successfully installed pip-21.3.1
Collecting pantsbuild.pants==2.9.0
Using cached pantsbuild.pants-2.9.0-cp39-cp39-macosx_11_0_arm64.whl (7.6 MB)
Collecting packaging==21.0
Using cached packaging-21.0-py3-none-any.whl (40 kB)
Collecting setproctitle==1.2.2
Using cached setproctitle-1.2.2-cp39-cp39-macosx_12_0_arm64.whl
Collecting types-PyYAML==5.4.3
Using cached types_PyYAML-5.4.3-py2.py3-none-any.whl (12 kB)
Collecting pex==2.1.61
Using cached pex-2.1.61-py2.py3-none-any.whl (2.6 MB)
Collecting types-toml==0.1.3
Using cached types_toml-0.1.3-py2.py3-none-any.whl (2.1 kB)
Collecting humbug==0.2.7
Using cached humbug-0.2.7-py3-none-any.whl (11 kB)
Collecting PyYAML<7.0,>=6.0
Using cached PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl (173 kB)
Collecting psutil==5.8.0
Using cached psutil-5.8.0-cp39-cp39-macosx_12_0_arm64.whl
Collecting typing-extensions==3.10.0.2
Using cached typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)
Collecting types-setuptools==57.0.0
Using cached types_setuptools-57.0.0-py3-none-any.whl (4.8 kB)
Requirement already satisfied: setuptools<58.0,>=56.0.0 in /Users/niklas.hildebrandt/.cache/pants/setup/bootstrap-Darwin-arm64/pants.JSvioR/install/lib/python3.9/site-packages (from pantsbuild.pants==2.9.0) (57.0.0)
Collecting ansicolors==1.1.8
Using cached ansicolors-1.1.8-py2.py3-none-any.whl (13 kB)
Collecting toml==0.10.2
Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting fasteners==0.16.3
Using cached fasteners-0.16.3-py2.py3-none-any.whl (28 kB)
Collecting ijson==3.1.4
Using cached ijson-3.1.4-py3-none-any.whl
Collecting six
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting requests
Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting pyparsing>=2.0.2
Using cached pyparsing-3.0.7-py3-none-any.whl (98 kB)
Collecting idna<4,>=2.5
Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
Collecting charset-normalizer~=2.0.0
Using cached charset_normalizer-2.0.10-py3-none-any.whl (39 kB)
Installing collected packages: urllib3, idna, charset-normalizer, certifi, six, requests, pyparsing, typing-extensions, types-toml, types-setuptools, types-PyYAML, toml, setproctitle, PyYAML, psutil, pex, packaging, ijson, humbug, fasteners, ansicolors, pantsbuild.pants
Successfully installed PyYAML-6.0 ansicolors-1.1.8 certifi-2021.10.8 charset-normalizer-2.0.10 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.7 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.8
New virtual environment successfully created at /Users/niklas.hildebrandt/.cache/pants/setup/bootstrap-Darwin-arm64/2.9.0_py39.
Traceback (most recent call last):
File "/Users/niklas.hildebrandt/.cache/pants/setup/bootstrap-Darwin-arm64/2.9.0_py39/bin/pants", line 5, in <module>
from pants.bin.pants_loader import main
File "/Users/niklas.hildebrandt/.cache/pants/setup/bootstrap-Darwin-arm64/pants.JSvioR/install/lib/python3.9/site-packages/pants/bin/pants_loader.py", line 19, in <module>
from pants.bin.pants_runner import PantsRunner
File "/Users/niklas.hildebrandt/.cache/pants/setup/bootstrap-Darwin-arm64/pants.JSvioR/install/lib/python3.9/site-packages/pants/bin/pants_runner.py", line 11, in <module>
from pants.base.exception_sink import ExceptionSink
File "/Users/niklas.hildebrandt/.cache/pants/setup/bootstrap-Darwin-arm64/pants.JSvioR/install/lib/python3.9/site-packages/pants/base/exception_sink.py", line 15, in <module>
import psutil
File "/Users/niklas.hildebrandt/.cache/pants/setup/bootstrap-Darwin-arm64/pants.JSvioR/install/lib/python3.9/site-packages/psutil/__init__.py", line 121, in <module>
from . import _psosx as _psplatform
File "/Users/niklas.hildebrandt/.cache/pants/setup/bootstrap-Darwin-arm64/pants.JSvioR/install/lib/python3.9/site-packages/psutil/_psosx.py", line 15, in <module>
from . import _psutil_osx as cext
ImportError: dlopen(/Users/niklas.hildebrandt/.cache/pants/setup/bootstrap-Darwin-arm64/pants.JSvioR/install/lib/python3.9/site-packages/psutil/_psutil_osx.cpython-39-darwin.so, 0x0002): tried: '/Users/niklas.hildebrandt/.cache/pants/setup/bootstrap-Darwin-arm64/pants.JSvioR/install/lib/python3.9/site-packages/psutil/_psutil_osx.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/_psutil_osx.cpython-39-darwin.so' (no such file), '/usr/lib/_psutil_osx.cpython-39-darwin.so' (no such file)
ancient-vegetable-10556
01/24/2022, 4:35 PM~/.cache/pants
— I find that using rm -rf
can take a long time, but running open ~/.cache
and dragging pants
to trash is quite fast.refined-addition-53644
01/24/2022, 4:36 PMancient-vegetable-10556
01/24/2022, 4:37 PMrefined-addition-53644
01/24/2022, 4:39 PMancient-vegetable-10556
01/24/2022, 4:39 PMARCHFLAGS
environment variable passed into the bootstrap processancient-vegetable-10556
01/24/2022, 4:41 PMARCHFLAGS="-arch arm64"
into the bootstrap process)refined-addition-53644
01/24/2022, 4:41 PMARCHFLAGS="-arch arm64" ./pants --version
refined-addition-53644
01/24/2022, 4:42 PMamd64
or arm64
?ancient-vegetable-10556
01/24/2022, 4:42 PMancient-vegetable-10556
01/24/2022, 4:42 PMancient-vegetable-10556
01/24/2022, 4:42 PMrefined-addition-53644
01/24/2022, 4:56 PMancient-vegetable-10556
01/24/2022, 5:00 PMhundreds-father-404
01/24/2022, 5:07 PMrm -rf ~/.cache/pants
? It looks like this issue is happening when bootstrapping Pants itself to run it, rather than when Pants is already running. So there wouldn't be any relevant Pants option to change
And that sounds useful to start with getting normal macOS terminal to work before trying alacracityenough-analyst-54434
01/24/2022, 5:30 PMCollecting pantsbuild.pants==2.9.0
Using cached pantsbuild.pants-2.9.0-cp39-cp39-macosx_11_0_arm64.whl (7.6 MB)
That should be mildly surprising. So Pip is grabbing wheels from its cache. If you look at psutil 5.8.0, although they added pre-built wheel support (used to be sdist only), they did not cover mac silicon; so ... presumably psutil gets a fresh build if you clear the Pip cache (that's ~/.cache/pip/
I believe...) Not sure that helps debugging at all, but its a variable it looks like folks are overlooking.ancient-vegetable-10556
01/24/2022, 5:39 PMhundreds-father-404
01/24/2022, 5:43 PMancient-vegetable-10556
01/24/2022, 5:49 PMenough-analyst-54434
01/24/2022, 5:59 PMpants
bootstrap bash to pip
and its subprocesses.enough-analyst-54434
01/24/2022, 6:01 PMenough-analyst-54434
01/24/2022, 6:02 PMenough-analyst-54434
01/24/2022, 6:16 PMvirtualenv.pex
. That said, PEX, in turn, only scrubs PEX*
env vars, but ...
OK, this should not be it since this code is only used for Pex CLI subprocesses and not the PEX runtime: https://github.com/pantsbuild/pex/blob/a81f49b50368fcabb2096760401a49d0f5618aea/pex/interpreter.py#L1124-L1178
But it is a mac hoop that could be related to this style issue in the case this code path was taken at runtime (it isn't after the final re-exec): https://github.com/pantsbuild/pex/blob/a81f49b50368fcabb2096760401a49d0f5618aea/pex/interpreter.py#L1124-L1178
So, for sanity sake, we can rule this all out with the following edit to the pants
script:
diff --git a/pants b/pants
index 995e5806a..b843efbef 100755
--- a/pants
+++ b/pants
@@ -291,7 +291,7 @@ function bootstrap_virtualenv {
echo "${VIRTUALENV_REQUIREMENTS}" > requirements.txt
(
scrub_PEX_env_vars
- "${python}" "${pex_path}" -r requirements.txt -c virtualenv -o virtualenv.pex
+ "${python}" "${pex_path}" -r requirements.txt -c virtualenv -o virtualenv.pex --venv -v
)
mkdir -p "$(dirname "${bootstrapped}")"
mv -f "${staging_dir}/virtualenv.pex" "${bootstrapped}"
@rapid-bird-79300 or @refined-addition-53644 can you try applying this patch in your repo, rm -rf ~/.cache/pip ~/.cache/pants/setup
and report back? I suspect this will solve nothing, but that will rule out Pex completely and allow unclouded pursuit of other angles.refined-addition-53644
01/25/2022, 9:54 AMenough-analyst-54434
01/25/2022, 8:01 PM--no-cache-dir
). That said, nuking caches is a "fix" that leaves us all ignorant. It's great it fixes the issue, but the issue is still not understood. Those sorts of "solved" issues ~always come back to bite you.refined-addition-53644
01/25/2022, 8:51 PMrapid-bird-79300
01/27/2022, 6:41 PMenough-analyst-54434
01/27/2022, 6:47 PMrapid-bird-79300
02/16/2022, 9:35 PMrapid-bird-79300
02/16/2022, 9:36 PMcreamy-monitor-52086
02/16/2022, 9:36 PMenough-analyst-54434
02/16/2022, 9:44 PMrm -rf ~/.cache/pants/setup ~/.cache/pip
?creamy-monitor-52086
02/16/2022, 9:48 PMBootstrapping Pants using /opt/homebrew/bin/python3.9
Creating the virtualenv PEX.
Downloading the Pex PEX.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 640 100 640 0 0 2095 0 --:--:-- --:--:-- --:--:-- 2119
100 3529k 100 3529k 0 0 2586k 0 0:00:01 0:00:01 --:--:-- 19.5M
SHA256 fingerprint of <https://github.com/pantsbuild/pex/releases/download/v2.1.42/pex> verified.
Installing pantsbuild.pants==2.7.0 into a virtual environment at /Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/2.7.0_py39
created virtual environment CPython3.9.10.final.0-64 in 316ms
creator CPython3Posix(dest=/Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.lKbdWs/install, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/alexstephen/Library/Application Support/virtualenv)
added seed packages: pip==21.1.2, setuptools==57.0.0, wheel==0.36.2
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Requirement already satisfied: pip in /Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.lKbdWs/install/lib/python3.9/site-packages (21.1.2)
Collecting pip
Using cached pip-22.0.3-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.1.2
Uninstalling pip-21.1.2:
Successfully uninstalled pip-21.1.2
Successfully installed pip-22.0.3
Collecting pantsbuild.pants==2.7.0
Using cached pantsbuild.pants-2.7.0-cp39-cp39-macosx_11_0_arm64.whl (8.9 MB)
Collecting ansicolors==1.1.8
Using cached ansicolors-1.1.8-py2.py3-none-any.whl (13 kB)
Collecting types-setuptools==57.0.0
Using cached types_setuptools-57.0.0-py3-none-any.whl (4.8 kB)
Collecting typing-extensions==3.7.4.3
Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting setproctitle==1.2.2
Using cached setproctitle-1.2.2-cp39-cp39-macosx_12_0_arm64.whl
Collecting types-PyYAML==5.4.3
Using cached types_PyYAML-5.4.3-py2.py3-none-any.whl (12 kB)
Collecting fasteners==0.16
Using cached fasteners-0.16-py2.py3-none-any.whl (28 kB)
Collecting packaging==21.0
Using cached packaging-21.0-py3-none-any.whl (40 kB)
Collecting toml==0.10.2
Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting psutil==5.8.0
Using cached psutil-5.8.0-cp39-cp39-macosx_12_0_arm64.whl
Collecting humbug==0.2.6
Using cached humbug-0.2.6-py3-none-any.whl (11 kB)
Collecting pex==2.1.44
Using cached pex-2.1.44-py2.py3-none-any.whl (2.6 MB)
Requirement already satisfied: setuptools<58.0,>=56.0.0 in /Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.lKbdWs/install/lib/python3.9/site-packages (from pantsbuild.pants==2.7.0) (57.0.0)
Collecting PyYAML<5.5,>=5.4
Using cached PyYAML-5.4.1-cp39-cp39-macosx_12_0_arm64.whl
Collecting types-toml==0.1.3
Using cached types_toml-0.1.3-py2.py3-none-any.whl (2.1 kB)
Collecting ijson==3.1.4
Using cached ijson-3.1.4-py3-none-any.whl
Collecting six
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting requests
Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting pyparsing>=2.0.2
Using cached pyparsing-3.0.7-py3-none-any.whl (98 kB)
Collecting idna<4,>=2.5
Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting charset-normalizer~=2.0.0
Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
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
Successfully installed PyYAML-5.4.1 ansicolors-1.1.8 certifi-2021.10.8 charset-normalizer-2.0.12 fasteners-0.16 humbug-0.2.6 idna-3.3 ijson-3.1.4 packaging-21.0 pantsbuild.pants-2.7.0 pex-2.1.44 psutil-5.8.0 pyparsing-3.0.7 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.7.4.3 urllib3-1.26.8
New virtual environment successfully created at /Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/2.7.0_py39.
Traceback (most recent call last):
File "/Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/2.7.0_py39/bin/pants", line 5, in <module>
from pants.bin.pants_loader import main
File "/Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.lKbdWs/install/lib/python3.9/site-packages/pants/bin/pants_loader.py", line 20, in <module>
from pants.bin.pants_runner import PantsRunner
File "/Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.lKbdWs/install/lib/python3.9/site-packages/pants/bin/pants_runner.py", line 11, in <module>
from pants.base.exception_sink import ExceptionSink
File "/Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.lKbdWs/install/lib/python3.9/site-packages/pants/base/exception_sink.py", line 15, in <module>
import psutil
File "/Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.lKbdWs/install/lib/python3.9/site-packages/psutil/__init__.py", line 121, in <module>
from . import _psosx as _psplatform
File "/Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.lKbdWs/install/lib/python3.9/site-packages/psutil/_psosx.py", line 15, in <module>
from . import _psutil_osx as cext
ImportError: dlopen(/Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.lKbdWs/install/lib/python3.9/site-packages/psutil/_psutil_osx.cpython-39-darwin.so, 0x0002): tried: '/Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.lKbdWs/install/lib/python3.9/site-packages/psutil/_psutil_osx.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/_psutil_osx.cpython-39-darwin.so' (no such file), '/usr/lib/_psutil_osx.cpython-39-darwin.so' (no such file)
enough-analyst-54434
02/16/2022, 9:52 PMUsing cached ...
... hrmenough-analyst-54434
02/16/2022, 9:54 PM~/.cache/pip
!enough-analyst-54434
02/16/2022, 9:57 PMenough-analyst-54434
02/16/2022, 10:00 PMDownloading ...
enough-analyst-54434
02/16/2022, 10:01 PMenough-analyst-54434
02/16/2022, 10:02 PM~/.cache/pip
directory with things in it after the failure? Are they owned by you?creamy-monitor-52086
02/16/2022, 11:14 PMenough-analyst-54434
02/16/2022, 11:18 PMenough-analyst-54434
02/16/2022, 11:21 PMrm -rf ~/.cache/pants/setup
PIP_VERBOSE=3 ./pants -V
enough-analyst-54434
02/16/2022, 11:25 PM$ diff -u pants.orig pants
--- pants.orig 2022-02-16 15:22:43.904301410 -0800
+++ pants 2022-02-16 15:24:27.236192364 -0800
@@ -359,6 +359,7 @@
"${python}" "${virtualenv_path}" --no-download "${staging_dir}/install" && \
# Grab the latest pip, but don't advance setuptools past 58 which drops support for the
# `setup` kwarg `use_2to3` which Pants 1.x sdist dependencies (pystache) use.
+ echo ">>> PIP Cache is here: $("${staging_dir}/install/bin/pip" cache dir)"
"${staging_dir}/install/bin/pip" install -U pip "setuptools<58" && \
"${staging_dir}/install/bin/pip" install ${maybe_find_links} --progress-bar off "${pants_requirement}"
) && \
$ rm -rf ~/.cache/pants/setup
$ ./pants -V 2>&1 | grep ">>> PIP"
>>> PIP Cache is here: /home/jsirois/.cache/pip
creamy-monitor-52086
02/16/2022, 11:34 PMcreamy-monitor-52086
02/16/2022, 11:34 PMenough-analyst-54434
02/16/2022, 11:35 PMpatch
or else just add the line yourself since its only 1 line.enough-analyst-54434
02/16/2022, 11:42 PM/Users/alexstephen/Library/Caches/pip
creamy-monitor-52086
02/16/2022, 11:43 PMenough-analyst-54434
02/16/2022, 11:43 PMrm -rf ~/Library/Caches/pip ~/.cache/pants/setup && PIP_VERBOSE=3 ./pants -V 2>&1 | tee output
? Thanks again.creamy-monitor-52086
02/16/2022, 11:44 PMenough-analyst-54434
02/16/2022, 11:47 PMcreamy-monitor-52086
02/17/2022, 12:44 AMcreamy-monitor-52086
02/17/2022, 12:45 AMenough-analyst-54434
02/17/2022, 1:05 AMenough-analyst-54434
02/17/2022, 1:08 AMrunning build_ext
building 'psutil._psutil_osx' extension
creating build/temp.macosx-12-arm64-3.9
creating build/temp.macosx-12-arm64-3.9/psutil
creating build/temp.macosx-12-arm64-3.9/psutil/arch
creating build/temp.macosx-12-arm64-3.9/psutil/arch/osx
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=580 -DPSUTIL_OSX=1 -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.xAEECz/install/include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c psutil/_psutil_common.c -o build/temp.macosx-12-arm64-3.9/psutil/_psutil_common.o
Created temporary directory: /private/var/folders/tw/5yj9fblj2374tt4ntr11p7bc0000gn/T/pip-wheel-oipdj8sh
Destination directory: /private/var/folders/tw/5yj9fblj2374tt4ntr11p7bc0000gn/T/pip-wheel-oipdj8sh
Building wheel for setproctitle (pyproject.toml): started
Running command Building wheel for setproctitle (pyproject.toml)
running bdist_wheel
running build
running build_ext
building 'setproctitle' extension
creating build
creating build/temp.macosx-12-arm64-3.9
creating build/temp.macosx-12-arm64-3.9/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -DSPT_VERSION=1.2.2 -D__darwin__=1 -I/Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.xAEECz/install/include -I/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/setproctitle.c -o build/temp.macosx-12-arm64-3.9/src/setproctitle.o
Note the Python includes. For psutil:
-I/Users/alexstephen/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.xAEECz/install/include
For setproctitle:
-I/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/include/python3.9
So it looks like the psutil build is somehow thinking its being executed by an x86_64 interpreter whereas setproctitle is seeing the homebrew interpreter.enough-analyst-54434
02/17/2022, 1:09 AMenough-analyst-54434
02/17/2022, 1:13 AMenough-analyst-54434
02/17/2022, 1:14 AMenough-analyst-54434
02/17/2022, 1:16 AMrapid-bird-79300
03/11/2022, 12:18 AMrm -rf ~/Library/Caches/pip
enough-analyst-54434
03/11/2022, 12:28 AMcreamy-monitor-52086
03/11/2022, 1:43 AM