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

Bug: ImportError on Mac ARM (Apple Silicon M1) #2197

Open
prism0x opened this issue Apr 20, 2022 · 0 comments
Open

Bug: ImportError on Mac ARM (Apple Silicon M1) #2197

prism0x opened this issue Apr 20, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@prism0x
Copy link

prism0x commented Apr 20, 2022

Describe the bug

Trying to import STT on Mac ARM gives the following error:

Python 3.10.2 (main, Apr 20 2022, 11:04:53) [Clang 13.1.6 (clang-1316.0.21.2.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import stt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/prism0x/.pyenv/versions/3.10.2/lib/python3.10/site-packages/stt/__init__.py", line 23, in <module>
    from stt.impl import Version as version
  File "/Users/prism0x/.pyenv/versions/3.10.2/lib/python3.10/site-packages/stt/impl.py", line 13, in <module>
    from . import _impl
ImportError: dlopen(/Users/prism0x/.pyenv/versions/3.10.2/lib/python3.10/site-packages/stt/_impl.cpython-310-darwin.so, 0x0002): tried: '/Users/prism0x/.pyenv/versions/3.10.2/lib/python3.10/site-packages/stt/_impl.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))

I have previously installed Python 3.10.2 using pyenv, because there were no STT PyPI package available for M1 for Python 3.9.

To Reproduce
Steps to reproduce the behavior:

$ brew install pyenv
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
$ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init --path)"\n  eval "$(pyenv init -)"\nfi' >> ~/.zshrc
$ pyenv install 3.10.2
$ reset
$ pyenv global 3.10.2

Then restart the shell, install STT and try to import it

$ pip3 install stt
$ python
>>> import stt

Expected behavior

I get the following error as mentioned above:

ImportError: dlopen(/Users/prism0x/.pyenv/versions/3.10.2/lib/python3.10/site-packages/stt/_impl.cpython-310-darwin.so, 0x0002): tried: '/Users/prism0x/.pyenv/versions/3.10.2/lib/python3.10/site-packages/stt/_impl.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))

Environment (please complete the following information):

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS Monterey 12.3.1 (21E258)
  • TensorFlow installed from (our builds, or upstream TensorFlow):
  • TensorFlow version (use command below):
  • Python version: 3.10.2
  • Bazel version (if compiling from source):
  • GCC/Compiler version (if compiling from source):
  • CUDA/cuDNN version:
  • GPU model and memory:
  • Exact command to reproduce:

Additional context
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant