Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[M1 macOS BigSur] no suitable image found #1954

Closed
mhanberg opened this issue May 26, 2021 · 5 comments · Fixed by #2040
Closed

[M1 macOS BigSur] no suitable image found #1954

mhanberg opened this issue May 26, 2021 · 5 comments · Fixed by #2040

Comments

@mhanberg
Copy link

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, 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
@mhanberg mhanberg added the bug label May 26, 2021
@github-actions github-actions bot added the macos label May 26, 2021
@giampaolo
Copy link
Owner

Mmmm what happens if you do pip install --no-binary :all: psutil? This should install psutil from sources.

@mhanberg
Copy link
Author

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).

@giampaolo
Copy link
Owner

giampaolo commented May 26, 2021

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.

georgemarshall pushed a commit to georgemarshall/psutil that referenced this issue Apr 6, 2022
Change the build.yml to add aarch64/arm64 builds

Closes giampaolo#1782, closes giampaolo#1945, closes giampaolo#1954, closes giampaolo#1966, closes giampaolo#1972,
closes giampaolo#2090

Signed-off-by: George Marshall <george@getsling.com>
@ColeDCrawford
Copy link

Thanks for the PR - any idea when this will get merged? The pip install --no-binary :all: psutil fix mentioned in #1954 isn't working for me.

giampaolo pushed a commit that referenced this issue Oct 18, 2022
)

This commit updates the build workflow to use the latest cibuildwheel as a GitHub Action.
cibuildwheel configuration is now in its own file (as there's no `pyproject.toml` yet)

Signed-off-by: mayeut <mayeut@users.noreply.github.com>
@giampaolo
Copy link
Owner

New psutil 5.9.3 is out with macOS arm64 binaries which should fix this issue.

ddelange added a commit to ddelange/psutil that referenced this issue Oct 28, 2022
* 'master' of https://github.com/giampaolo/psutil:
  add windows test for free physical mem giampaolo#2074
  fix OSX tests broken by accident
  update HISTORY + give CREDITS for @arossert, @smoofra, @mayeut for giampaolo#2102, giampaolo#2156, giampaolo#2010
  build fix for Mac OS, Apple Silicon (giampaolo#2010)
  Linux: fix missing SPEED_UNKNOWN definition (giampaolo#2156)
  Use system-level values for Windows virtual memory (giampaolo#2077)
  feature: use ABI3 for cp36+ (giampaolo#2102)
  fix py2 compatibility
  improve API speed benchmark script giampaolo#2102
  fix: linter issues from giampaolo#2146 (giampaolo#2155)
  chore: skip test_cpu_freq on macOS arm64 (giampaolo#2146)
  pre-release + give CREDITS to @mayeut (PR giampaolo#2040) and @eallrich (new supporter)
  Fix a typo (giampaolo#2047)
  move isort and coverage config into pyproject.toml
  fix giampaolo#2021, fix giampaolo#1954, provide OSX arm64 bins + add pyproject.toml (giampaolo#2040)
  refactor git_log.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants