neovim-remote
neovim-remote copied to clipboard
Not working on arm64 Mac (M1)
I have a little script i use to save and quit all neovim instances.
On my M1 mac I am seeing this error.
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
I am running into the same issue. Anyone know of a way to get it to work on Apple Silicon?
Unfortunately I don't have a M1, but duckduckgo suggests it's a common issue in the Python world.
Maybe you have better chances getting it solved by creating an issue for psutil instead, which is one of our dependencies.
The error says that it tries to use a Python C extension, a shared library. But that library seems to be compiled only for the "old" Intel architecture, hence the "mach-o, but wrong architecture".
So, I think this is more of a "Python3 on M1" issue than with psutil.
Suggestions:
- The Internet says that Python 3.9.1 was the first to add experimental M1 support, so maybe just upgrading Python and then reinstalling psutil via pip is the way go.
- If the above doesn't work, raise an issue with psutil.
@mhinz Thank you for taking the time to answer! 🙏 will investigate.
This seemed to get it working for me https://github.com/giampaolo/psutil/issues/1954#issuecomment-848817744