mhinz / neovim-remote

:ok_hand: Support for --remote and friends.
MIT License
1.73k stars 83 forks source link

Not working on arm64 Mac (M1) #165

Open mhanberg opened 3 years ago

mhanberg commented 3 years ago

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, in 
    from 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

ferdinandsalis commented 3 years ago

I am running into the same issue. Anyone know of a way to get it to work on Apple Silicon?

mhinz commented 3 years ago

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:

ferdinandsalis commented 3 years ago

@mhinz Thank you for taking the time to answer! 🙏 will investigate.

mhanberg commented 3 years ago

This seemed to get it working for me https://github.com/giampaolo/psutil/issues/1954#issuecomment-848817744