Skip to content

[ BUG ] Incompatible with M1 Mac #2240

Open
@ibehnam

Description

@ibehnam

Describe the bug

I followed the instructions and made sure to pay attention to this as well.

However, upon running the server python server.py, I get:

Traceback (most recent call last):
  File "/Users/behnam/Downloads/text-generation-webui/server.py", line 21, in <module>
    import gradio as gr
  File "/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/gradio/__init__.py", line 3, in <module>
    import gradio.components as components
  File "/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/gradio/components.py", line 56, in <module>
    from gradio.blocks import Block, BlockContext
  File "/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/gradio/blocks.py", line 26, in <module>
    from gradio import (
  File "/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/gradio/networking.py", line 17, in <module>
    from gradio.routes import App
  File "/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/gradio/routes.py", line 24, in <module>
    import orjson
  File "/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/orjson/__init__.py", line 3, in <module>
    from .orjson import *
ImportError: dlopen(/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/orjson/orjson.cpython-310-darwin.so, 0x0002): tried: '/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/orjson/orjson.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/orjson/orjson.cpython-310-darwin.so' (no such file), '/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/orjson/orjson.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

I tried running the terminal in Rosetta mode but still got the same error.

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

Follow the instructions and pay attention to this as well.

Then run the server python server.py.

Screenshot

No response

Logs

Traceback (most recent call last):
  File "/Users/behnam/Downloads/text-generation-webui/server.py", line 21, in <module>
    import gradio as gr
  File "/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/gradio/__init__.py", line 3, in <module>
    import gradio.components as components
  File "/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/gradio/components.py", line 56, in <module>
    from gradio.blocks import Block, BlockContext
  File "/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/gradio/blocks.py", line 26, in <module>
    from gradio import (
  File "/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/gradio/networking.py", line 17, in <module>
    from gradio.routes import App
  File "/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/gradio/routes.py", line 24, in <module>
    import orjson
  File "/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/orjson/__init__.py", line 3, in <module>
    from .orjson import *
ImportError: dlopen(/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/orjson/orjson.cpython-310-darwin.so, 0x0002): tried: '/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/orjson/orjson.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/orjson/orjson.cpython-310-darwin.so' (no such file), '/Users/behnam/opt/anaconda3/envs/textgen/lib/python3.10/site-packages/orjson/orjson.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))


### System Info

```shell
M1 Mac, Ventura 13.3.1 (22E261)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions