cellpose
cellpose copied to clipboard
Segmentation Fault when Cellpose is not First Import on M3 Mac [BUG]
Importing any package before Cellpose in a python script results in a segfault when the model is instantiated.
import numpy as np # or matplotlib, skimage ...
from cellpose.models import Cellpose
model = Cellpose(gpu=True, model_type='cyto')
However running
from cellpose.models import Cellpose
import numpy as np # or matplotlib, skimage ...
model = Cellpose(gpu=True, model_type='cyto')
works fine.
To Reproduce Running in a cellpose conda environment on 64-bit arm M3 Mac. Installed using https://forum.image.sc/t/cellpose-napari-napari-n2v-installation-and-use/79521/3 but I think same issue with standard installation instructions https://forum.image.sc/t/cellpose-on-macos-m1-pro-apple-silicon-arm64/68018/4 .
Run log
(cellpose) nicholb@CM2WYTVH6V hcr-pypline % python tests/minimal_cellpose_bug.py --verbose
zsh: segmentation fault python tests/minimal_cellpose_bug.py --verbose