psutil
psutil copied to clipboard
[M1 macOS BigSur] no suitable image found
Summary
- OS: macOS Big Sur
- Architecture: ARM
- Psutil version: 5.8.0
- Python version: 3.9.4
Description
I am trying to use the python library neovim-remote, but I am running into this psutil error while on my M1 mac. I opened an issue there, but the author suggested I open one here.
I installed neovim remote with pip3 install --user neovim-remote
Thanks!
This is the stacktrace I get when try to use that tool
Traceback (most recent call last): File "/Users/mitchell/Library/Python/3.9/bin/nvr", line 5, infrom nvr.nvr import main File "/Users/mitchell/Library/Python/3.9/lib/python/site-packages/nvr/__init__.py", line 1, in from .nvr import main File "/Users/mitchell/Library/Python/3.9/lib/python/site-packages/nvr/nvr.py", line 33, in import psutil File "/Users/mitchell/Library/Python/3.9/lib/python/site-packages/psutil/__init__.py", line 121, in from . import _psosx as _psplatform File "/Users/mitchell/Library/Python/3.9/lib/python/site-packages/psutil/_psosx.py", line 15, in from . import _psutil_osx as cext ImportError: dlopen(/Users/mitchell/Library/Python/3.9/lib/python/site-packages/psutil/_psutil_osx.cpython-39-darwin.so, 2): no suitable image found. Did find: /Users/mitchell/Library/Python/3.9/lib/python/site-packages/psutil/_psutil_osx.cpython-39-darwin.so: mach-o, but wrong architecture /Users/mitchell/Library/Python/3.9/lib/python/site-packages/psutil/_psutil_osx.cpython-39-darwin.so: mach-o, but wrong architecture
Mmmm what happens if you do pip install --no-binary :all: psutil
? This should install psutil from sources.
That worked!!
Thank you so much! This has been a major bump in my workflow since getting my M1. (I don't really know anything about Python).
That means the wheels that we currently produce are not compatible with macOS Big Sur / ARM, so it should probably be addresed / reported at https://github.com/pypa/wheel.
Thanks for the PR - any idea when this will get merged? The pip install --no-binary :all: psutil
fix mentioned in https://github.com/giampaolo/psutil/issues/1954 isn't working for me.
New psutil 5.9.3 is out with macOS arm64 binaries which should fix this issue.