简体   繁体   English

ModuleNotFoundError:没有名为“skimage.util.montage”的模块

[英]ModuleNotFoundError: No module named 'skimage.util.montage'

I'm trying to import montage2d module from scikit-image:我正在尝试从 scikit-image 导入montage2d模块:

from skimage.util.montage import montage2d

But this error popped up:但是出现了这个错误:

ModuleNotFoundError: No module named 'skimage.util.montage'

I'm pretty sure I installed the scikit-image package as:我很确定我将 scikit-image 包安装为:

pip install scikit-image (0.14.0) pip install scikit-image (0.14.0)

I also tried Anaconda:我也试过蟒蛇:

conda install -c conda-forge scikit-image (0.14.0) conda install -c conda-forge scikit-image conda conda install -c conda-forge scikit-image forge conda install -c conda-forge scikit-image (0.14.0)

Build from source doesn't work either.从源代码构建也不起作用。

In scikit-image=0.14.0 skimage.util.montage.scikit-image=0.14.0 skimage.util.montage. namespace has been removed, montage2d function has been deprecated and moved to skimage.util.montage2d .命名空间已被删除, montage2d函数已被弃用并移至skimage.util.montage2d

For more info, see the release notes for the version 0.14.0 - https://github.com/scikit-image/scikit-image/blob/master/doc/release/release_0.14.rst .有关更多信息,请参阅0.14.0版本的发行说明 - https://github.com/scikit-image/scikit-image/blob/master/doc/release/release_0.14.rst

To get rid of editing from a lot of lines, I used to import in this manner,为了摆脱很多行的编辑,我曾经以这种方式导入,

from skimage.util import montage as montage2d

Also, you can change the version as described above.此外,您可以按上述方式更改版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM