关于 Cython 错误:ModuleNotFoundError using HistomicsTK libray in Python

问题描述 投票:0回答:0

导入 HistomicsTK 时出错。 HistomicsTK 是一个用于分析数字病理图像的 Python 包。 我根据提供的安装说明将其安装在 Windows 上。

这是github地址。 https://github.com/DigitalSlideArchive/HistomicsTK

所以我认为这个错误与cython相关。但是指南中并没有对cython相关的具体解释。我该如何解决这个问题?

提前谢谢你!

import histomicstk as htk

import numpy as np
import scipy as sp

import skimage.io
import skimage.measure
import skimage.color

import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
%matplotlib inline

#Some nice default configuration for plots
plt.rcParams['figure.figsize'] = 10, 10
plt.rcParams['image.cmap'] = 'gray'
titlesize = 24

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], line 1
----> 1 import histomicstk as htk
      3 import numpy as np
      4 import scipy as sp

File \HistomicsTK\histomicstk\__init__.py:2
      1 # import sub-packages to support nested calls
----> 2 from . import segmentation  # must be imported before features
      3 from . import utils  # must be imported before other packages
      4 from . import (annotations_and_masks, features, filters, preprocessing,
      5                saliency, workflows)

File \HistomicsTK\histomicstk\segmentation\__init__.py:11
      8 from histomicstk.utils.simple_mask import simple_mask
     10 # import sub-packages to support nested calls
---> 11 from . import label, level_set, nuclear, positive_pixel_count
     12 from .embed_boundaries import embed_boundaries
     13 from .rag import rag

File \HistomicsTK\histomicstk\segmentation\label\__init__.py:18
     16 from .shuffle import shuffle
     17 from .split import split
---> 18 from .trace_object_boundaries import trace_object_boundaries
     19 from .width_open import width_open
     21 # list out things that are available for public use

File \HistomicsTK\histomicstk\segmentation\label\trace_object_boundaries.py:3
      1 import numpy as np
----> 3 from ._trace_object_boundaries_cython import _trace_object_boundaries_cython
      6 def trace_object_boundaries(im_label,
      7                             conn=4, trace_all=False,
      8                             x_start=None, y_start=None,
      9                             max_length=None,
     10                             simplify_colinear_spurs=True,
     11                             eps_colinear_area=0.01):
     12     """Performs exterior boundary tracing of one or more objects in a label
     13     mask. If a starting point is not provided then a raster scan will be performed
     14     to identify the starting pixel.
   (...)
     63 
     64     """

ModuleNotFoundError: No module named 'histomicstk.segmentation.label._trace_object_boundaries_cython'
python cython
© www.soinside.com 2019 - 2024. All rights reserved.