breezy-church-49979
06/14/2022, 10:33 PMbreezy-church-49979
06/14/2022, 10:33 PMTraceback (most recent call last):
File "/Users/nferro/.cache/pants/setup/bootstrap-Darwin-x86_64/2.11.0_py39/bin/pants", line 5, in <module>
from pants.bin.pants_loader import main
File "/Users/nferro/.cache/pants/setup/bootstrap-Darwin-x86_64/2.11.0_py39/lib/python3.9/site-packages/pants/bin/pants_loader.py", line 19, in <module>
from pants.bin.pants_runner import PantsRunner
File "/Users/nferro/.cache/pants/setup/bootstrap-Darwin-x86_64/2.11.0_py39/lib/python3.9/site-packages/pants/bin/pants_runner.py", line 11, in <module>
from pants.base.exception_sink import ExceptionSink
File "/Users/nferro/.cache/pants/setup/bootstrap-Darwin-x86_64/2.11.0_py39/lib/python3.9/site-packages/pants/base/exception_sink.py", line 16, in <module>
import psutil
File "/Users/nferro/.cache/pants/setup/bootstrap-Darwin-x86_64/2.11.0_py39/lib/python3.9/site-packages/psutil/__init__.py", line 123, in <module>
from . import _psosx as _psplatform
File "/Users/nferro/.cache/pants/setup/bootstrap-Darwin-x86_64/2.11.0_py39/lib/python3.9/site-packages/psutil/_psosx.py", line 14, in <module>
from . import _psutil_osx as cext
ImportError: dlopen(/Users/nferro/.cache/pants/setup/bootstrap-Darwin-x86_64/2.11.0_py39/lib/python3.9/site-packages/psutil/_psutil_osx.cpython-39-darwin.so, 0x0002): tried: '/Users/nferro/.cache/pants/setup/bootstrap-Darwin-x86_64/2.11.0_py39/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')), '/Users/nferro/.cache/pants/setup/bootstrap-Darwin-x86_64/pants.2HjakR/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'))
Has anyone faced this issue before?happy-kitchen-89482
06/14/2022, 10:37 PMhappy-kitchen-89482
06/14/2022, 10:37 PMhappy-kitchen-89482
06/14/2022, 10:38 PM/Users/nferro/.cache/pants/setup/bootstrap-Darwin-x86_64/2.11.0_py39/bin/pants
happy-kitchen-89482
06/14/2022, 10:39 PMx86_64
bit seems wrong, on an ARM64 machinehappy-kitchen-89482
06/14/2022, 10:40 PMfile /Users/nferro/.cache/pants/setup/bootstrap-Darwin-x86_64/2.11.0_py39/lib/python3.9/site-packages/psutil/_psutil_osx.cpython-39-darwin.so
breezy-church-49979
06/14/2022, 10:51 PMarm64
instead:
Traceback (most recent call last):
File "/Users/nferro/.cache/pants/setup/bootstrap-Darwin-arm64/2.11.0_py39/bin/pants", line 5, in <module>
from pants.bin.pants_loader import main
File "/Users/nferro/.cache/pants/setup/bootstrap-Darwin-arm64/2.11.0_py39/lib/python3.9/site-packages/pants/bin/pants_loader.py", line 19, in <module>
from pants.bin.pants_runner import PantsRunner
File "/Users/nferro/.cache/pants/setup/bootstrap-Darwin-arm64/2.11.0_py39/lib/python3.9/site-packages/pants/bin/pants_runner.py", line 11, in <module>
from pants.base.exception_sink import ExceptionSink
File "/Users/nferro/.cache/pants/setup/bootstrap-Darwin-arm64/2.11.0_py39/lib/python3.9/site-packages/pants/base/exception_sink.py", line 16, in <module>
import psutil
File "/Users/nferro/.cache/pants/setup/bootstrap-Darwin-arm64/2.11.0_py39/lib/python3.9/site-packages/psutil/__init__.py", line 123, in <module>
from . import _psosx as _psplatform
File "/Users/nferro/.cache/pants/setup/bootstrap-Darwin-arm64/2.11.0_py39/lib/python3.9/site-packages/psutil/_psosx.py", line 14, in <module>
from . import _psutil_osx as cext
ImportError: dlopen(/Users/nferro/.cache/pants/setup/bootstrap-Darwin-arm64/2.11.0_py39/lib/python3.9/site-packages/psutil/_psutil_osx.cpython-39-darwin.so, 0x0002): tried: '/Users/nferro/.cache/pants/setup/bootstrap-Darwin-arm64/2.11.0_py39/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')), '/Users/nferro/.cache/pants/setup/bootstrap-Darwin-arm64/pants.xHOKd3/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'))
breezy-church-49979
06/14/2022, 10:52 PMfile /Users/nferro/.cache/pants/setup/bootstrap-Darwin-arm64/2.11.0_py39/lib/python3.9/site-packages/psutil/_psutil_osx.cpython-39-darwin.so
I get this:
/Users/nferro/.cache/pants/setup/bootstrap-Darwin-arm64/2.11.0_py39/lib/python3.9/site-packages/psutil/_psutil_osx.cpython-39-darwin.so: Mach-O 64-bit bundle x86_64
happy-kitchen-89482
06/15/2022, 2:30 PMhappy-kitchen-89482
06/15/2022, 2:30 PMhappy-kitchen-89482
06/15/2022, 2:33 PMarch -x64
?happy-kitchen-89482
06/15/2022, 2:35 PM~/.cache/pants
and the pip cache ~/Library/Caches/pip
to one side, and re-bootstrapping by running ./pants
(without rosetta)breezy-church-49979
06/17/2022, 5:40 PMarch -x86_64 ./*pants* version
once. I've removed both ~/.cache/pants
and ~/Library/Caches/pip
, and also ~/Library/Caches/pipenv
just in case. Still no luck. Seeing the same error as beforehappy-kitchen-89482
06/17/2022, 9:30 PMarch
, just running it nativelybreezy-church-49979
06/18/2022, 2:27 AMarch
bit, I said yeah I had but only once. After that one time, I always ran it without the arch
bit and I'm still facing the same issue šhappy-kitchen-89482
06/18/2022, 8:58 AMhappy-kitchen-89482
06/18/2022, 8:59 AMbreezy-church-49979
06/18/2022, 9:38 AM~/Library/Caches/pipenv ~/Library/Caches/pip ~/.cache/pants/
⢠Ran pipenv shell
to start a virtual env
⢠Ran ./pants
And then I get the error. I've also tried cleaning up the virtual environment and running pants rightaway (without the virtual env), but still getting the same error.
Python version: Python 3.9.10
(CPython)
Pants version: 2.10.0
Pipenv version: 2022.6.7
breezy-church-49979
06/18/2022, 9:38 AM2.11.0
breezy-church-49979
06/18/2022, 9:44 AMpsutil
using this command pip install --no-binary :all: psutil
, an arm64 wheel version of it gets downloaded, but when I run unzip psutil-5.9.1-cp39-cp39-macosx_11_0_arm64.whl
and then file psutil/_psutil_osx.cpython-39-darwin.so
I get this:
psutil/_psutil_osx.cpython-39-darwin.so: Mach-O 64-bit bundle x86_64
happy-kitchen-89482
06/18/2022, 6:27 PMpipenv shell
bit - Pants manages its own virtualenvs)happy-kitchen-89482
06/18/2022, 6:29 PM--no-binary
flag tells pip to ignore wheels and only use sdists. So that pip install --no-binary :all: psutil
command should be building a local wheel from a downloaded sdist.happy-kitchen-89482
06/18/2022, 6:30 PMpsutil-5.9.1-cp39-cp39-macosx_11_0_arm64.whl
you inspected is what was built locally on your machine, then for some reason you're getting an x86_64 binary as a result of a local buildhappy-kitchen-89482
06/18/2022, 6:32 PMCollecting psutil
Downloading psutil-5.9.1.tar.gz (479 kB)
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā 479.1/479.1 KB 1.5 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: psutil
Building wheel for psutil (pyproject.toml) ... done
Created wheel for psutil: filename=psutil-5.9.1-cp39-cp39-macosx_12_0_x86_64.whl size=239918 sha256=b7cb70137f8012752d13e1fc6eab0356d2bde2508ef5f188c3a55749fd9a944d
Stored in directory: /Users/benjyw/Library/Caches/pip/wheels/65/66/89/7ecefa8b8cfa845352eab83061e5f0f93946a306ae25661e03
Successfully built psutil
Installing collected packages: psutil
Successfully installed psutil-5.9.1
happy-kitchen-89482
06/18/2022, 6:34 PMbreezy-church-49979
06/18/2022, 7:40 PMhappy-kitchen-89482
06/18/2022, 7:41 PMpsutil/_psutil_osx.cpython-39-darwin.so: Mach-O 64-bit bundle arm64
happy-kitchen-89482
06/18/2022, 7:41 PMhappy-kitchen-89482
06/18/2022, 7:45 PMbreezy-church-49979
06/18/2022, 7:46 PMCollecting psutil
Downloading psutil-5.9.1.tar.gz (479 kB)
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā 479.1/479.1 kB 4.8 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: psutil
Building wheel for psutil (pyproject.toml) ... done
Created wheel for psutil: filename=psutil-5.9.1-cp39-cp39-macosx_11_0_arm64.whl size=215962 sha256=743fc90a2b4c1ce322546d8c6d0facf5dfef90b9bb2358082f77a91c348a7e79
Stored in directory: /Users/nferro/Library/Caches/pip/wheels/65/66/89/7ecefa8b8cfa845352eab83061e5f0f93946a306ae25661e03
Successfully built psutil
Installing collected packages: psutil
Successfully installed psutil-5.9.1
breezy-church-49979
06/18/2022, 7:48 PMsite-packages file psutil/_psutil_osx.cpython-39-darwin.so
psutil/_psutil_osx.cpython-39-darwin.so: Mach-O 64-bit bundle x86_64
breezy-church-49979
06/18/2022, 7:48 PMno-binary
bit, your created wheel step looks like this:
Created wheel for psutil: filename=psutil-5.9.1-cp39-cp39-macosx_12_0_x86_64.whl
whereas mine has 'arm64' instead of 'x86_64':
Created wheel for psutil: filename=psutil-5.9.1-cp39-cp39-macosx_11_0_arm64.whl
happy-kitchen-89482
06/18/2022, 7:52 PMhappy-kitchen-89482
06/18/2022, 7:52 PMhappy-kitchen-89482
06/18/2022, 7:52 PMhappy-kitchen-89482
06/18/2022, 7:53 PMbreezy-church-49979
06/18/2022, 7:53 PMbreezy-church-49979
06/18/2022, 7:53 PMhappy-kitchen-89482
06/18/2022, 7:53 PMpython3.9 -c "import platform; print(platform.platform())"
?breezy-church-49979
06/18/2022, 7:54 PMmacOS-12.4-arm64-arm-64bit
happy-kitchen-89482
06/18/2022, 7:54 PMhappy-kitchen-89482
06/18/2022, 7:54 PMhappy-kitchen-89482
06/18/2022, 7:55 PMbreezy-church-49979
06/18/2022, 7:55 PMbreezy-church-49979
06/18/2022, 7:55 PMbreezy-church-49979
06/18/2022, 7:58 PMbreezy-church-49979
06/18/2022, 8:33 PMhappy-kitchen-89482
06/19/2022, 11:16 AM