WenChentao / 3DeeCellTracker

A python algorithm for tracking cells in 3D time lapse images.
MIT License
48 stars 9 forks source link

SystemError: initialization of _internal failed without raising an exception #14

Open mayaw9 opened 3 months ago

mayaw9 commented 3 months ago

I'm on a Microsoft Windows 10 Enterprise system that's an x64-based PC with a NVIDIA Quadro RTX 5000 GPU. I have correctly installed everything as per following your instructions including Anaconda, however I'm not on a Linux system I'm trying to use this with Windows. When I open the Jupyter notebook in Softwares > 3DeeCellTracker-master > Examples > use_stardist > track_stardist_ensemble_mode and try to run the very first cell with the various import statements, I get the error below. Would appreciate any help troubleshooting this error / advice if you've seen any similar issues in the past.

Error I'm getting:


SystemError Traceback (most recent call last) Cell In[2], line 9 6 get_ipython().run_line_magic('matplotlib', 'inline') 7 import numpy as np ----> 9 import CellTracker.trackerlite as trl 10 import CellTracker.stardistwrapper as sdw 11 import CellTracker.coord_image_transformer as cit

File K:\mayaw9\Softwares\Anaconda\envs\track\lib\site-packages\CellTracker\trackerlite.py:16 13 from scipy.stats import trim_mean 14 from scipy import ndimage ---> 16 from CellTracker.coord_image_transformer import Coordinates, plot_prgls_prediction, plot_two_pointset_scatters 17 from CellTracker.ffn import initial_matching_ffn, normalize_points, FFN 18 from CellTracker.stardistwrapper import load_2d_slices_at_time

File K:\mayaw9\Softwares\Anaconda\envs\track\lib\site-packages\CellTracker\coord_image_transformer.py:18 15 from skimage.segmentation import relabel_sequential 16 from tifffile import imread ---> 18 from CellTracker.stardistwrapper import lbl_cmap, load_2d_slices_at_time 19 from CellTracker.watershed import recalculate_cell_boundaries 21 MERGED_LABELS_XZ = "merged_labels_xz"

File K:\mayaw9\Softwares\Anaconda\envs\track\lib\site-packages\CellTracker\stardistwrapper.py:21 19 from csbdeep.utils import Path, normalize 20 from numpy import ndarray ---> 21 from stardist import Rays_GoldenSpiral 22 from stardist import fill_label_holes, random_label_cmap, calculate_extents, gputools_available 23 from stardist.models import Config3D

File K:\mayaw9\Softwares\Anaconda\envs\track\lib\site-packages\stardist__init.py:13 10 from .version import version__ 12 # TODO: which functions to expose here? all? ---> 13 from .nms import non_maximum_suppression, non_maximum_suppression_3d, non_maximum_suppression_3d_sparse 14 from .utils import edt_prob, fill_label_holes, sample_points, calculate_extents, export_imagej_rois, gputools_available 15 from .geometry import star_dist, polygons_to_label, relabel_image_stardist, ray_angles, dist_to_coord

File K:\mayaw9\Softwares\Anaconda\envs\track\lib\site-packages\stardist\nms.py:4 2 import numpy as np 3 from time import time ----> 4 from .utils import _normalize_grid 6 def _ind_prob_thresh(prob, prob_thresh, b=2): 7 if b is not None and np.isscalar(b):

File K:\mayaw9\Softwares\Anaconda\envs\track\lib\site-packages\stardist\utils.py:18 15 from csbdeep.utils.six import Path 16 from collections.abc import Iterable ---> 18 from .matching import matching_dataset, _check_label_array 21 try: 22 from edt import edt

File K:\mayaw9\Softwares\Anaconda\envs\track\lib\site-packages\stardist\matching.py:3 1 import numpy as np ----> 3 from numba import jit 4 from tqdm import tqdm 5 from scipy.optimize import linear_sum_assignment

File K:\mayaw9\Softwares\Anaconda\envs\track\lib\site-packages\numba__init__.py:42 38 from numba.core.decorators import (cfunc, generated_jit, jit, njit, stencil, 39 jit_module) 41 # Re-export vectorize decorators and the thread layer querying function ---> 42 from numba.np.ufunc import (vectorize, guvectorize, threading_layer, 43 get_num_threads, set_num_threads, 44 set_parallel_chunksize, get_parallel_chunksize, 45 get_thread_id) 47 # Re-export Numpy helpers 48 from numba.np.numpy_support import carray, farray, from_dtype

File K:\mayaw9\Softwares\Anaconda\envs\track\lib\site-packages\numba\np\ufunc__init__.py:3 1 # -- coding: utf-8 -- ----> 3 from numba.np.ufunc.decorators import Vectorize, GUVectorize, vectorize, guvectorize 4 from numba.np.ufunc._internal import PyUFunc_None, PyUFunc_Zero, PyUFunc_One 5 from numba.np.ufunc import _internal, array_exprs

File K:\mayaw9\Softwares\Anaconda\envs\track\lib\site-packages\numba\np\ufunc\decorators.py:3 1 import inspect ----> 3 from numba.np.ufunc import _internal 4 from numba.np.ufunc.parallel import ParallelUFuncBuilder, ParallelGUFuncBuilder 6 from numba.core.registry import DelayedRegistry

SystemError: initialization of _internal failed without raising an exception

WenChentao commented 3 months ago

Would appreciate any help troubleshooting this error / advice if you've seen any similar issues in the past.

I do not know the reason. Seems the error occurred when importing stardist library.

vislabwwy commented 3 months ago

I met initilization of inernal failed,too. Solve by upgrading numpy and numba.

pip install numpy/numba --upgrade

mayaw9 commented 3 months ago

I tried this and though I successfully installed/updated numpy and numba, I am still getting the same error.