pocketsphinx
pocketsphinx copied to clipboard
ToT wants arm64e or arm64 to build on Apple silicon, but pypi version is fine
The pypi version instealls fine on macOS on Apple Silicon, but when building from source:
python
Python 3.12.4 (main, Jul 8 2024, 10:17:47) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pocketsphinx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../ve_slab/lib/python3.12/site-packages/pocketsphinx/__init__.py", line 41, in <module>
from . import _pocketsphinx as pocketsphinx # noqa: F401
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: dlopen(.../ve_slab/lib/python3.12/site-packages/pocketsphinx/_pocketsphinx.cpython-312-darwin.so, 0x0002): tried: '.../ve_slab/lib/python3.12/site-packages/pocketsphinx/_pocketsphinx.cpython-312-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '..../ve_slab/lib/python3.12/site-packages/pocketsphinx/_pocketsphinx.cpython-312-darwin.so' (no such file), '...../ve_slab/lib/python3.12/site-packages/pocketsphinx/_pocketsphinx.cpython-312-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
When doing pip install . it did not complain.
To fix it locally,
arch -arm64 python -m pip install .
does the trick.
Thanks Kevin! I must have misconfigured cibuildwheel somehow - is it the case that the universal builds are not really universal?
This appears fixed, probably due to changes from Apple