0

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.18.1) I'm trying pip install scikit-image==0.13.1 but it failed enter image description here

Wasim
  • 1
  • 2
  • Did you look at this [modulenotfounderror-no-module-named-skimage-util-montage](https://stackoverflow.com/questions/51684500/modulenotfounderror-no-module-named-skimage-util-montage)? – Ahmet Jan 04 '21 at 17:51
  • Please edit the question to include the error message as text. Consider [these reasons and guidelines](https://meta.stackoverflow.com/a/285557). – bad_coder Jan 05 '21 at 21:37

1 Answers1

0

Try:

from skimage.util import montage

Or, with older versions:

pip install scikit-image==0.13.1

from skimage.util.montage import montage2d
Synthase
  • 5,849
  • 2
  • 12
  • 34
  • I'm trying to import montage2d module from scikit-image: from skimage.util import montage2d cannot import name 'montage2d' from 'skimage.util – Wasim Jan 04 '21 at 17:51
  • I edited, in your version it seems to have been replaced by montage. If you really want montage2d, then use pip install scikit-image==0.13.1 and your original syntax – Synthase Jan 04 '21 at 17:55
  • I tried to download this version pip install scikit-image==0.13.1 but it failed – Wasim Jan 04 '21 at 18:08
  • it failed is not really informative, what is the log message? try to pip uninstall scikit-image before – Synthase Jan 04 '21 at 18:12
  • " Building wheels for collected packages: scikit-image Building wheel for scikit-image (setup.py) ... error ERROR: Command errored out with exit status 1: Partial import of skimage during the build process. Cython >= 0.23 not found; falling back to pre-built geometry.c Cython >= 0.23 not found; falling back to pre-built transform.c.......etc " – Wasim Jan 04 '21 at 18:57
  • pip install Cython – Synthase Jan 04 '21 at 19:15
  • I downloaded cython ... but my problem was not resolved – Wasim Jan 04 '21 at 21:34
  • Building wheels for collected packages: scikit-image Building wheel for scikit-image (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'c:\users\wasim\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = – Wasim Jan 04 '21 at 21:42
  • Running setup.py clean for scikit-image Failed to build scikit-image Installing collected packages: scikit-image Running setup.py install for scikit-image ... error ERROR: Command errored out with exit status 1: command: 'c:\users\wasim\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\wasim\\AppData\\Local\\Temp\\pip-ins – Wasim Jan 04 '21 at 21:43