Skip to content

AMICI segfault on macOS ARM (M2 Chip) #3088

@NantiaL

Description

@NantiaL

We are facing issues trying to install AMICI on Mac and would be really grateful for any help! We went thourgh past related issues in this repo, but all provided hints were not helpful for us. Here some details:

System

• macOS Sonoma
• Apple Silicon (M2) MacBook
• conda env created via conda create -n modeling_x86 --platform osx-64 python=3.11
• running under Rosetta 2 (arch -x86_64 zsh)
• Python 3.11
• pip install succeeds, import causes segmentation fault

We tried:

  1. Native arm64 (conda env modeling)
conda create -n modeling python=3.11
pip install pypesto
pip install amici

Result: PackagesNotFoundError: amici
Amici probably not available for osx-arm64

  1. Created x86 environment (Rosetta)
arch -x86_64 zsh
conda create -n modeling_x86 --platform osx-64 python=3.11
conda activate modeling_x86
  1. Installed build dependencies
  • attempted Homebrew but refused under Rosetta (Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)!)
  • so instead installed build tools via conda
    conda install cmake make -c conda-forge
  1. Then pip install amici
    Output ends with:
    Successfully built amici Successfully installed amici-0.34.2 ...
    So actual installation appears successful.

Problem when running:
python -c "import amici; print(amici.__version__)"
Output:
zsh: segmentation fault python -c "import amici; print(amici.__version__)"

Notes:
• issue probably lies on segmentation fault = native C/C++ crash; no Python traceback
• this happens both in python and inside Jupyter kernel
• I fully understand AMICI does not provide official ARM wheels, but it might make sense to detect architecture mismatch and give a clear error instead of a silent successful build followed by runtime segfault.
• SciPy, numpy, pypesto etc. work fine in both envs only Amici seems to be the problem

Many thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions