I use conda (installed via brew install miniforge) for the python installation and I created a new environment for the asitop along with latest version of python (3.10.2).
After installing asitop via pip install asitop
, I got following error message:
Traceback (most recent call last):
File "/opt/homebrew/Caskroom/miniforge/base/envs/asitop/bin/asitop", line 5, in <module>
from asitop.asitop import main
File "/opt/homebrew/Caskroom/miniforge/base/envs/asitop/lib/python3.10/site-packages/asitop/asitop.py", line 6, in <module>
from .utils import *
File "/opt/homebrew/Caskroom/miniforge/base/envs/asitop/lib/python3.10/site-packages/asitop/utils.py", line 5, in <module>
import psutil
File "/opt/homebrew/Caskroom/miniforge/base/envs/asitop/lib/python3.10/site-packages/psutil/__init__.py", line 123, in <module>
from . import _psosx as _psplatform
File "/opt/homebrew/Caskroom/miniforge/base/envs/asitop/lib/python3.10/site-packages/psutil/_psosx.py", line 14, in <module>
from . import _psutil_osx as cext
ImportError: dlopen(/opt/homebrew/Caskroom/miniforge/base/envs/asitop/lib/python3.10/site-packages/psutil/_psutil_osx.cpython-310-darwin.so, 0x0002): tried: '/opt/homebrew/Caskroom/miniforge/base/envs/asitop/lib/python3.10/site-packages/psutil/_psutil_osx.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))
Removing psutil and reinstalling seems to show that correct arch binary is installed:
pip install psutil
Collecting psutil
Using cached psutil-5.9.1-cp310-cp310-macosx_11_0_arm64.whl
Installing collected packages: psutil
Successfully installed psutil-5.9.1
But I still ended up with same error message.
So I decided to build psutil locally:
pip install --no-binary :all: psutil
(from https://github.com/giampaolo/psutil/blob/master/INSTALL.rst and you need Xcode installed already)
And it finally worked.
Thanks for the awesome package.
I'm creating the issue here in case someone else runs into the same issue.