Segmentation Fault when Cellpose is not First Import on M3 Mac [BUG]
Closed this issue · 2 comments
bennm37 commented
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
YashM8 commented
Even this is giving an error -
from cellpose.models import Cellpose
model = Cellpose(model_type='cyto3')
print("done")
Process finished with exit code 139 (interrupted by signal 11:SIGSEGV)
On a M1 Pro Mac with 16GB of memory.
carsen-stringer commented
please try the latest cellpose version, let me know if it's still an issue pip install cellpose --upgrade