You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Device: MacOS, MacBook Pro M2 Max, ver. Ventura 13.4
pip3 seems to take a different arch of capstone's dylib - x86_64, instead of my device's one - arm64
Made sure that pip3 has a cleared cache of wheels
Running:
`
pip3 install capstone
python3 -m capstone
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.9.17/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/opt/homebrew/Cellar/[email protected]/3.9.17/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/opt/homebrew/Cellar/[email protected]/3.9.17/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 111, in _get_module_details import(pkg_name)
File "/opt/homebrew/lib/python3.9/site-packages/capstone/init.py", line 372, in
_cs = _load_lib(_path)
File "/opt/homebrew/lib/python3.9/site-packages/capstone/init.py", line 345, in _load_lib
return ctypes.cdll.LoadLibrary(lib_file)
File "/opt/homebrew/Cellar/[email protected]/3.9.17/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/init.py", line 452, in LoadLibrary
return self._dlltype(name)
File "/opt/homebrew/Cellar/[email protected]/3.9.17/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/init.py", line 374, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/opt/homebrew/lib/python3.9/site-packages/capstone/lib/libcapstone.dylib, 0x0006): tried: '/opt/homebrew/lib/python3.9/site-packages/capstone/lib/libcapstone.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/python3.9/site-packages/capstone/lib/libcapstone.dylib' (no such file), '/opt/homebrew/lib/python3.9/site-packages/capstone/lib/libcapstone.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
`
I check my platform's architecture using python - it might be related to the issue:
`
python3
Python 3.9.17 (main, Jun 15 2023, 08:01:12)
[Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
from distutils.util import get_platform
print(get_platform())
macosx-13-arm64
`
Device: MacOS, MacBook Pro M2 Max, ver. Ventura 13.4
pip3 seems to take a different arch of capstone's dylib - x86_64, instead of my device's one - arm64
Made sure that pip3 has a cleared cache of wheels
Running:
`
Double checked that with lipo:
`
I check my platform's architecture using python - it might be related to the issue:
`
Then I tried:
`
And accessing the module works now when I put this package in $PATH:
`
The text was updated successfully, but these errors were encountered: