autopy icon indicating copy to clipboard operation
autopy copied to clipboard

Unable to install autopy on Mac ARM64 M1

Open pawel345 opened this issue 3 years ago • 1 comments

After installing the AutoPy (pip install autopy), when I try to use it in my code I got following errors:

File "/Users/pawellewicki/git/FX/venvARM/lib/python3.8/site-packages/autopy/init.py", line 6, in from . import alert, bitmap, color, key, mouse, screen ImportError: dlopen(/Users/pawellewicki/git/FX/venvARM/lib/python3.8/site-packages/autopy/alert.cpython-38-darwin.so, 0x0002): tried: '/Users/pawellewicki/git/FX/venvARM/lib/python3.8/site-packages/autopy/alert.cpython-38-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/alert.cpython-38-darwin.so' (no such file), '/usr/lib/alert.cpython-38-darwin.so' (no such file)

pawel345 avatar Jan 12 '22 14:01 pawel345

I have experienced this with the opencv-python library. It seems like your command line is running it on intel architecture, but the package is meant for ARM64.

Im not sure what your running it from, but I would recommend running your program from terminal first. The command arch should return ARM64. If not, you should disable rosetta mode in your terminal

Existance29 avatar Mar 10 '23 02:03 Existance29