Skip to content

Can't import qsimcirq on MacOS ARM64 #495

@honamnguyen

Description

@honamnguyen

pip install qsimcirq works on my Mac with the M1 chip but then import qsimcirq gives the following error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/honamnguyen/miniconda3/envs/qcircuit/lib/python3.9/site-packages/qsimcirq/__init__.py", line 17, in <module>
    from qsimcirq import qsim_decide
ImportError: dlopen(/Users/honamnguyen/miniconda3/envs/qcircuit/lib/python3.9/site-packages/qsimcirq/qsim_decide.cpython-39-darwin.so, 0x0002): tried: '/Users/honamnguyen/miniconda3/envs/qcircuit/lib/python3.9/site-packages/qsimcirq/qsim_decide.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/qsim_decide.cpython-39-darwin.so' (no such file), '/usr/lib/qsim_decide.cpython-39-darwin.so' (no such file)

I found these threads here and here that seem to have a solution which is way over my head but might be useful. If not, I'd also appreciate any suggestion for a work-around. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions