Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm trying to import montage2d module from scikit-image:

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:

pip install scikit-image (0.14.0)

I also tried Anaconda:

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

Build from source doesn't work either.

like image 523
hiepph Avatar asked Aug 04 '18 10:08

hiepph


2 Answers

In scikit-image=0.14.0 skimage.util.montage. namespace has been removed, montage2d function has been deprecated and moved to 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.

like image 136
soupault Avatar answered Sep 26 '22 11:09

soupault


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.

like image 22
ashraful16 Avatar answered Sep 25 '22 11:09

ashraful16