ImportError: cannot import name 'compare_ssim' from 'skimage.measure' (or 'greycomatrix', TypeError: unexpected keyword argument 'multichannel', 'selem'): which scikit-image release removed it and what to use
scikit-image 0.18.0 (2020-12-15) removed compare_ssim, compare_psnr, compare_mse and compare_nrmse from skimage.measure: import structural_similarity, peak_signal_noise_ratio, mean_squared_error and normalized_root_mse from skimage.metrics. 0.19.0 removed rgb2grey (use rgb2gray), draw.circle (draw.disk) and morphology.watershed (segmentation.watershed). 0.20.0 (2023-02-28) removed greycomatrix (graycomatrix), skimage.morphology.selem, skimage.viewer, skimage.future.graph (now skimage.graph), and the arguments multichannel= (use channel_axis=) and selem= (use footprint=). If the error comes from a library you did not write, upgrade that library or pin scikit-image below the release that removed the name. Paste the error below for the release-by-release answer.
Examples:
Runs in your browser on the data in this page (skimage_names.json); nothing you paste is sent anywhere.
Which release removed the name, and what replaces it?
58 functions and modules that one scikit-image release has and a later one does not. "Instead" is scikit-image's own text (51 of 58): its deprecation message in the last release that had the name, or the error it raises afterwards. "Same result" means the old and the new spelling were both run on the same small test image and returned identical output (18 names).
| Name | Removed in | Instead |
|---|---|---|
skimage.external (module) | 0.17.1 | The bundled copy of tifffile went with it: use the tifffile package itself (import tifffile), which scikit-image 0.17.1 and later install as a dependency. (our note) |
skimage.external.tifffile (module) | 0.17.1 | Use the tifffile package itself (import tifffile), which scikit-image 0.17.1 and later install as a dependency. (our note) (same result as tifffile.imread, run in 0.16.2 against 0.17.1) |
skimage.segmentation.relabel_from_one | 0.17.1 | Deprecated function. Use `relabel_sequential` instead. |
skimage.data.rough_wall | 0.17.2 | |
skimage.color.guess_spatial_dimensions | 0.18.0 | This function is deprecated and will be removed in 0.18 |
skimage.data.load | 0.18.0 | This function is deprecated and will be removed in 0.18. Use `skimage.io.load` or `imageio.imread` directly. |
skimage.measure.compare_mse | 0.18.0 | skimage.measure.compare_mse has been moved to skimage.metrics.mean_squared_error. It will be removed from skimage.measure in version 0.18. (same result as metrics.mean_squared_error, run in 0.16.2 to 0.17.2) |
skimage.measure.compare_nrmse | 0.18.0 | skimage.measure.compare_nrmse has been moved to skimage.metrics.normalized_root_mse. It will be removed from skimage.measure in version 0.18. (same result as metrics.normalized_root_mse, run in 0.16.2 to 0.17.2) |
skimage.measure.compare_psnr | 0.18.0 | skimage.measure.compare_psnr has been moved to skimage.metrics.peak_signal_noise_ratio. It will be removed from skimage.measure in version 0.18. (same result as metrics.peak_signal_noise_ratio, run in 0.16.2 to 0.17.2) |
skimage.measure.compare_ssim | 0.18.0 | skimage.measure.compare_ssim has been moved to skimage.metrics.structural_similarity. It will be removed from skimage.measure in version 0.18. (same result as metrics.structural_similarity, run in 0.16.2 to 0.17.2) |
skimage.measure.simple_metrics (module) | 0.18.0 | Import from skimage.metrics: mean_squared_error, normalized_root_mse, peak_signal_noise_ratio. (our note) |
skimage.transform.histogram_matching (module) | 0.18.0 | Import match_histograms from skimage.exposure. (our note) |
skimage.transform.match_histograms | 0.18.0 | skimage.transform.match_histograms has been moved to skimage.exposure.match_histograms. It will be removed from skimage.transform in version 0.18. (same result as exposure.match_histograms, run in 0.16.2 to 0.17.2) |
skimage.color.grey2rgb | 0.19.0 | grey2rgb is deprecated. It will be removed in version 0.19.Please use gray2rgb instead. (same result as color.gray2rgb, run in 0.16.2 to 0.18.3) |
skimage.color.rgb2grey | 0.19.0 | rgb2grey is deprecated. It will be removed in version 0.19.Please use rgb2gray instead. (same result as color.rgb2gray, run in 0.16.2 to 0.18.3) |
skimage.draw.circle | 0.19.0 | `draw.circle` is deprecated in favor of `draw.disk`.`draw.circle` will be removed in version 0.19 (same result as draw.disk((5, 5), 2), run in 0.17.1 to 0.18.3) |
skimage.feature.masked_register_translation | 0.19.0 | Deprecated function. Use `skimage.registration.phase_cross_correlation` instead. |
skimage.feature.register_translation | 0.19.0 | Deprecated function. Use `skimage.registration.phase_cross_correlation` instead. (same result as registration.phase_cross_correlation, run in 0.17.1 to 0.18.3) |
skimage.filters.rank.bottomhat | 0.19.0 | rank.bottomhat is deprecated. This filter is named incorrectly, which can be confusing. As we believe that the usefulness is narrow, this function will be removed in 0.19. |
skimage.filters.rank.tophat | 0.19.0 | rank.tophat is deprecated. This filter is named incorrectly, which can be confusing. As we believe that the usefulness is narrow, this function will be removed in 0.19. |
skimage.measure.marching_cubes_classic | 0.19.0 | marching_cubes_classic is deprecated in favor of marching_cubes with `method='_lorensen'` to apply Lorensen et al. algorithm. marching_cubes_classic will be removed in version 0.19 |
skimage.measure.marching_cubes_lewiner | 0.19.0 | marching_cubes_lewiner is deprecated in favor of marching_cubes. marching_cubes_lewiner will be removed in version 0.19 (same result as measure.marching_cubes, run in 0.17.1 to 0.18.3) |
skimage.morphology.watershed | 0.19.0 | Deprecated function. Use `skimage.segmentation.watershed` instead. (same result as segmentation.watershed, run in 0.16.2 to 0.18.3) |
skimage.segmentation.circle_level_set | 0.19.0 | circle_level_set is deprecated in favor of disk_level_set.circle_level_set will be removed in version 0.19 |
skimage.util.pad | 0.19.0 | skimage.util.pad is deprecated and will be removed in version 0.19. Please use numpy.pad instead. (same result as numpy.pad, run in 0.16.2 to 0.18.3) |
skimage.viewer (module) | 0.20.0 | `viewer` is deprecated and will be removed in 0.20. For alternatives, refer to https://scikit-image.org/docs/stable/user_guide/visualization.html |
skimage.feature.greycomatrix | 0.20.0 | Deprecated function. Use `skimage.feature.graycomatrix` instead. (same result as feature.graycomatrix, run in 0.19.0 to 0.19.3) |
skimage.feature.greycoprops | 0.20.0 | Deprecated function. Use `skimage.feature.graycoprops` instead. (same result as feature.graycoprops, run in 0.19.0 to 0.19.3) |
skimage.feature.structure_tensor_eigvals | 0.20.0 | the function structure_tensor_eigvals is deprecated and will be removed in version 0.20. Please use structure_tensor_eigenvalues instead. |
skimage.future.graph (module) | 0.20.0 | The `skimage.future.graph` submodule was moved to `skimage.graph` in v0.20. `ncut` was removed in favor of the identical function `cut_normalized`. Please update your import paths accordingly. |
skimage.future.graph.cut_normalized | 0.20.0 | The `skimage.future.graph` submodule was moved to `skimage.graph` in v0.20. `ncut` was removed in favor of the identical function `cut_normalized`. Please update your import paths accordingly. |
skimage.future.graph.cut_threshold | 0.20.0 | The `skimage.future.graph` submodule was moved to `skimage.graph` in v0.20. `ncut` was removed in favor of the identical function `cut_normalized`. Please update your import paths accordingly. |
skimage.future.graph.graph_cut (module) | 0.20.0 | The `skimage.future.graph` submodule was moved to `skimage.graph` in v0.20. `ncut` was removed in favor of the identical function `cut_normalized`. Please update your import paths accordingly. |
skimage.future.graph.graph_merge (module) | 0.20.0 | The `skimage.future.graph` submodule was moved to `skimage.graph` in v0.20. `ncut` was removed in favor of the identical function `cut_normalized`. Please update your import paths accordingly. |
skimage.future.graph.merge_hierarchical | 0.20.0 | The `skimage.future.graph` submodule was moved to `skimage.graph` in v0.20. `ncut` was removed in favor of the identical function `cut_normalized`. Please update your import paths accordingly. |
skimage.future.graph.ncut | 0.20.0 | The `skimage.future.graph` submodule was moved to `skimage.graph` in v0.20. `ncut` was removed in favor of the identical function `cut_normalized`. Please update your import paths accordingly. |
skimage.future.graph.RAG | 0.20.0 | The `skimage.future.graph` submodule was moved to `skimage.graph` in v0.20. `ncut` was removed in favor of the identical function `cut_normalized`. Please update your import paths accordingly. |
skimage.future.graph.rag (module) | 0.20.0 | The `skimage.future.graph` submodule was moved to `skimage.graph` in v0.20. `ncut` was removed in favor of the identical function `cut_normalized`. Please update your import paths accordingly. |
skimage.future.graph.rag_boundary | 0.20.0 | The `skimage.future.graph` submodule was moved to `skimage.graph` in v0.20. `ncut` was removed in favor of the identical function `cut_normalized`. Please update your import paths accordingly. |
skimage.future.graph.rag_mean_color | 0.20.0 | The `skimage.future.graph` submodule was moved to `skimage.graph` in v0.20. `ncut` was removed in favor of the identical function `cut_normalized`. Please update your import paths accordingly. (same result as graph.rag_mean_color, run in 0.19.3 against 0.20.0) |
skimage.future.graph.show_rag | 0.20.0 | The `skimage.future.graph` submodule was moved to `skimage.graph` in v0.20. `ncut` was removed in favor of the identical function `cut_normalized`. Please update your import paths accordingly. |
skimage.morphology.grey (module) | 0.20.0 | Importing from skimage.morphology.grey is deprecated. Please import from skimage.morphology instead. |
skimage.morphology.greyreconstruct (module) | 0.20.0 | Importing from skimage.morphology.greyreconstruct is deprecated. Please import from skimage.morphology instead. |
skimage.morphology.selem (module) | 0.20.0 | The `skimage.morphology.selem` module is deprecated and will be removed in scikit-image 1.0 (`skimage.morphology.selem` has been moved to `skimage.morphology.footprints`). (same result as morphology.disk(2), run in 0.16.2 to 0.19.3) |
skimage.viewer.canvastools (module) | 0.20.0 | `viewer` is deprecated and will be removed in 0.20. For alternatives, refer to https://scikit-image.org/docs/stable/user_guide/visualization.html |
skimage.viewer.CollectionViewer | 0.20.0 | `CollectionViewer` is deprecated and will be removed in 0.20. For alternatives, refer to https://scikit-image.org/docs/stable/user_guide/visualization.html |
skimage.viewer.ImageViewer | 0.20.0 | `viewer` is deprecated and will be removed in 0.20. For alternatives, refer to https://scikit-image.org/docs/stable/user_guide/visualization.html |
skimage.viewer.plugins (module) | 0.20.0 | `viewer` is deprecated and will be removed in 0.20. For alternatives, refer to https://scikit-image.org/docs/stable/user_guide/visualization.html |
skimage.viewer.qt (module) | 0.20.0 | `qt` plugin is deprecated and will be removed in 0.20. For alternatives, refer to https://scikit-image.org/docs/stable/user_guide/visualization.html |
skimage.viewer.utils (module) | 0.20.0 | `viewer` is deprecated and will be removed in 0.20. For alternatives, refer to https://scikit-image.org/docs/stable/user_guide/visualization.html |
skimage.viewer.viewers (module) | 0.20.0 | `viewer` is deprecated and will be removed in 0.20. For alternatives, refer to https://scikit-image.org/docs/stable/user_guide/visualization.html |
skimage.viewer.widgets (module) | 0.20.0 | `viewer` is deprecated and will be removed in 0.20. For alternatives, refer to https://scikit-image.org/docs/stable/user_guide/visualization.html |
skimage.data.create_image_fetcher | 0.21.0 | |
skimage.data.image_fetcher | 0.21.0 | |
skimage.filters.compute_hessian_eigenvalues | 0.22.0 | `compute_hessian_eigenvalues` is deprecated since version 0.20 and will be removed in version 0.22. Use `skimage.feature.hessian_matrix_eigvals` on the results of `skimage.feature.hessian_matrix` instead. |
skimage.filters.inverse | 0.22.0 | `inverse` is deprecated since version 0.20 and will be removed in version 0.22. Use `skimage.filters.filter_inverse` instead. |
skimage.feature.plot_matches | 0.25.0 | `plot_matches` is deprecated since version 0.23 and will be removed in version 0.25. Use `skimage.feature.plot_matched_features` instead. |
skimage.morphology.skeletonize_3d | 0.25.0 | `skeletonize_3d` is deprecated since version 0.23 and will be removed in version 0.25. Use `skimage.morphology.skeletonize` instead. (same result as morphology.skeletonize, run in 0.16.2 to 0.24.0) |
Which release removed the argument (unexpected keyword argument)?
133 function arguments that stopped being accepted, in 37 groups. "TypeError from" is the first release where the function no longer has the argument in its signature and no longer wraps it; "Accepted with a warning" lists the releases whose deprecation wrapper still took the old name (blank: no wrapper was found; the function may still have warned in its own code). The new name is the one scikit-image's wrapper mapped the old name to, or the one its warning names. The 0.19 warnings say the old names "will be removed in version 1.0"; the removal was measured in 0.20.0.
| Old argument | Use instead | TypeError from | Accepted with a warning | Functions |
|---|---|---|---|---|
beta1= | beta= | 0.17.2 | filters.frangi | |
beta1= | 0.17.2 | filters.hessian | ||
beta2= | gamma= | 0.17.2 | filters.frangi | |
beta2= | 0.17.2 | filters.hessian | ||
img= | image= | 0.17.2 | morphology.skeletonize_3d | |
mask= | Change 'behavior' to 'rank' if you want to use the parameters 'mask', 'shift_x', 'shift_y'. They will be discarded otherwise. | 0.17.2 | filters.median | |
shift_x= | Change 'behavior' to 'rank' if you want to use the parameters 'mask', 'shift_x', 'shift_y'. They will be discarded otherwise. | 0.17.2 | filters.median | |
shift_y= | Change 'behavior' to 'rank' if you want to use the parameters 'mask', 'shift_x', 'shift_y'. They will be discarded otherwise. | 0.17.2 | filters.median | |
neighbors= | connectivity= | 0.18.0 | measure.label, morphology.convex_hull_object, morphology.label | |
bc= | 0.18.0 | segmentation.active_contour | ||
inplace= | in_place= | 0.19.0 | morphology.flood_fill, segmentation.flood_fill | |
alpha= | alpha argument is deprecated and will be removed in version 0.19. Please use the gray2rgba function insteadto obtain an RGBA image. | 0.19.0 | color.gray2rgb | |
filter= | filter_name= | 0.19.0 | 0.17.1 to 0.18.3 | transform.iradon |
selem= | footprint= | 0.20.0 | 0.19.0 to 0.19.3 | filters.median, filters.rank.autolevel, filters.rank.autolevel_percentile, filters.rank.enhance_contrast, filters.rank.enhance_contrast_percentile, filters.rank.entropy, filters.rank.equalize, filters.rank.geometric_mean, filters.rank.gradient, filters.rank.gradient_percentile, filters.rank.majority, filters.rank.maximum, filters.rank.mean, filters.rank.mean_bilateral, filters.rank.mean_percentile, filters.rank.median, filters.rank.minimum, filters.rank.modal, filters.rank.noise_filter, filters.rank.otsu, filters.rank.percentile, filters.rank.pop, filters.rank.pop_bilateral, filters.rank.pop_percentile, filters.rank.subtract_mean, filters.rank.subtract_mean_percentile, filters.rank.sum, filters.rank.sum_bilateral, filters.rank.sum_percentile, filters.rank.threshold, filters.rank.threshold_percentile, filters.rank.windowed_histogram, morphology.binary_closing, morphology.binary_dilation, morphology.binary_erosion, morphology.binary_opening, morphology.black_tophat, morphology.closing, morphology.dilation, morphology.erosion, morphology.flood, morphology.flood_fill, morphology.h_maxima, morphology.h_minima, morphology.local_maxima, morphology.local_minima, morphology.opening, morphology.reconstruction, morphology.white_tophat, segmentation.flood, segmentation.flood_fill |
multichannel= | channel_axis= | 0.20.0 | 0.19.0 to 0.19.3 | draw.random_shapes, exposure.match_histograms, feature.hog, feature.multiscale_basic_features, filters.difference_of_gaussians, filters.gaussian, filters.unsharp_mask, restoration.cycle_spin, restoration.denoise_bilateral, restoration.denoise_nl_means, restoration.denoise_tv_bregman, restoration.denoise_tv_chambolle, restoration.denoise_wavelet, restoration.estimate_sigma, restoration.inpaint_biharmonic, segmentation.felzenszwalb, segmentation.random_walker, segmentation.slic, transform.pyramid_expand, transform.pyramid_gaussian, transform.pyramid_laplacian, transform.pyramid_reduce, transform.rescale, util.apply_parallel, util.montage |
max_iter= | max_num_iter= | 0.20.0 | 0.19.0 to 0.19.3 | filters.threshold_minimum, morphology.thin, restoration.denoise_tv_bregman, segmentation.chan_vese, segmentation.slic |
in_place= | out= | 0.20.0 | 0.19.0 to 0.19.3 | morphology.remove_small_holes, morphology.remove_small_objects, segmentation.clear_border |
iterations= | num_iter= | 0.20.0 | 0.19.0 to 0.19.3 | restoration.richardson_lucy, segmentation.morphological_chan_vese, segmentation.morphological_geodesic_active_contour |
coordinates= | The coordinates keyword argument to skimage.measure.regionprops is deprecated. All features are now computed in rc (row-column) coordinates. Please remove `coordinates="rc"` from all calls to regionprops before updating scikit-image. | 0.20.0 | measure.regionprops, segmentation.active_contour | |
input= | label_image= | 0.20.0 | 0.19.0 to 0.19.3 | measure.label, morphology.label |
array= | image= | 0.20.0 | 0.18.0 to 0.19.3 | measure.find_contours |
height= | ncols= | 0.20.0 | 0.18.0 to 0.19.3 | morphology.rectangle |
indices= | indices argument is deprecated and will be removed in version 0.20. To avoid this warning, please do not use the indices argument. Please see peak_local_max documentation for more details. | 0.20.0 | 0.18.0 to 0.19.3 | feature.peak_local_max |
max_iterations= | max_num_iter= | 0.20.0 | 0.19.0 to 0.19.3 | segmentation.active_contour |
n_iter_max= | max_num_iter= | 0.20.0 | 0.19.2 to 0.19.3 | restoration.denoise_tv_chambolle |
neighbourhood= | 0.20.0 | measure.perimeter | ||
width= | nrows= | 0.20.0 | 0.18.0 to 0.19.3 | morphology.rectangle |
random_state= | rng= | 0.23.0 | 0.21.0 to 0.22.0 | feature.draw_haar_like_feature, graph.cut_normalized, measure.ransac, morphology.medial_axis, restoration.unsupervised_wiener |
seed= | rng= | 0.23.0 | 0.21.0 to 0.22.0 | data.binary_blobs, restoration.unwrap_phase, transform.probabilistic_hough_line |
random_seed= | rng= | 0.23.0 | 0.21.0 to 0.22.0 | draw.random_shapes, segmentation.quickshift |
return_error= | 0.23.0 | 0.22.0 | registration.phase_cross_correlation | |
sample_seed= | rng= | 0.23.0 | 0.21.0 to 0.22.0 | feature.BRIEF |
image2= | 0.24.0 | util.compare_images | ||
output= | out= | 0.25.0 | 0.23.0 to 0.24.0 | filters.gaussian |
shift_x= | 0.26.0 | morphology.dilation, morphology.erosion | ||
shift_y= | 0.26.0 | morphology.dilation, morphology.erosion | ||
num_workers= | 0.26.0 | feature.multiscale_basic_features |
What does scikit-image 0.26.0 warn about now?
16 functions and 7 arguments still work in 0.26.0 but carry scikit-image's deprecation wrapper, read from the installed package. The removal release is scikit-image's own plan and may change.
| Name | Deprecated since | Planned removal | scikit-image's hint |
|---|---|---|---|
skimage.io.call_plugin | 0.25 | 0.27 | The plugin infrastructure of `skimage.io` is deprecated. Instead, use `imageio` or other I/O packages directly. |
skimage.io.find_available_plugins | 0.25 | 0.27 | The plugin infrastructure of `skimage.io` is deprecated. Instead, use `imageio` or other I/O packages directly. |
skimage.io.imshow | 0.25 | 0.27 | Please use `matplotlib`, `napari`, etc. to visualize images. |
skimage.io.imshow_collection | 0.25 | 0.27 | Please use `matplotlib`, `napari`, etc. to visualize images. |
skimage.io.plugin_info | 0.25 | 0.27 | The plugin infrastructure of `skimage.io` is deprecated. Instead, use `imageio` or other I/O packages directly. |
skimage.io.plugin_order | 0.25 | 0.27 | The plugin infrastructure of `skimage.io` is deprecated. Instead, use `imageio` or other I/O packages directly. |
skimage.io.reset_plugins | 0.25 | 0.27 | The plugin infrastructure of `skimage.io` is deprecated. Instead, use `imageio` or other I/O packages directly. |
skimage.io.show | 0.25 | 0.27 | Please use `matplotlib`, `napari`, etc. to visualize images. |
skimage.io.use_plugin | 0.25 | 0.27 | The plugin infrastructure of `skimage.io` is deprecated. Instead, use `imageio` or other I/O packages directly. |
skimage.morphology.binary_closing | 0.26 | 0.28 | Use `skimage.morphology.closing` instead. |
skimage.morphology.binary_dilation | 0.26 | 0.28 | Use `skimage.morphology.dilation` instead. Note the lack of mirroring for non-symmetric footprints (see docstring notes). |
skimage.morphology.binary_erosion | 0.26 | 0.28 | Use `skimage.morphology.erosion` instead. Note the pixel shift by 1 for even-sized footprints (see docstring notes). |
skimage.morphology.binary_opening | 0.26 | 0.28 | Use `skimage.morphology.opening` instead. |
skimage.morphology.cube | 0.25 | 0.27 | Use `skimage.morphology.footprint_rectangle` instead. |
skimage.morphology.rectangle | 0.25 | 0.27 | Use `skimage.morphology.footprint_rectangle` instead. |
skimage.morphology.square | 0.25 | 0.27 | Use `skimage.morphology.footprint_rectangle` instead. |
skimage.io.imread(plugin=) | 0.25 | 0.27 | |
skimage.io.imread_collection(plugin=) | 0.25 | 0.27 | |
skimage.io.imsave(plugin=) | 0.25 | 0.27 | |
skimage.morphology.remove_small_holes(area_threshold=) | 0.26.0 | 2.0.0 | Use max_size= instead. |
skimage.morphology.remove_small_objects(min_size=) | 0.26.0 | 2.0.0 | Use max_size= instead. |
skimage.restoration.cycle_spin(num_workers=) | 0.26 | 0.28 | Use workers= instead. |
skimage.restoration.rolling_ball(num_threads=) | 0.26 | 0.28 | Use workers= instead. |
How was this measured?
Each of 22 scikit-image releases (0.16.2 to 0.26.0, patch releases included) was installed from PyPI in its own environment; the public names of 22 modules (skimage and its subpackages) were listed with dir(), and getattr or an import was run for the union of all 715 names in every release. Releases: 0.16.2, 0.17.1, 0.17.2, 0.18.0, 0.18.1, 0.18.2, 0.18.3, 0.19.0, 0.19.1, 0.19.2, 0.19.3, 0.20.0, 0.21.0 (Python 3.8); 0.22.0 (Python 3.9); 0.23.0, 0.23.1, 0.23.2, 0.24.0, 0.25.0, 0.25.1, 0.25.2 (Python 3.10); 0.26.0 (Python 3.11). 0.23.0 was yanked on PyPI and is included. Each ran with a NumPy of its time (NumPy 1.19.5 for 0.16.2 to 0.17.2; NumPy 1.21.6 for 0.18.0 to 0.18.3; NumPy 1.22.4 for 0.19.0 to 0.19.3; NumPy 1.24.4 for 0.20.0 to 0.21.0; NumPy 1.26.4 for 0.22.0 to 0.24.0; NumPy 2.2.6 for 0.25.0 to 0.25.2; NumPy 2.4.6 for 0.26.0) and with matplotlib installed. The 25 older releases on PyPI (0.7.2 to 0.16.1) have no wheel for Python 3.8 or later and were not installed, so a name removed before 0.16.2 is outside this page.
For the arguments, the parameters of every public function and class (460 in 0.26.0) were read with inspect.signature in each release, together with the deprecation wrappers scikit-image attaches to a function (deprecate_kwarg, deprecate_multichannel_kwarg, remove_arg, deprecate_parameter). An argument is listed when a release accepts it and a later one has neither the parameter, nor a wrapper for it, nor **kwargs. That rule was checked against real calls: 29 old-argument calls were run in every release, and whether each raised TypeError: ... unexpected keyword argument agreed with the rule in all 594 call-and-release pairs. Arguments passed by position, and arguments a function forwards through **kwargs, are not covered.
The names table keeps names in a module's __all__, submodule files, and anything scikit-image itself deprecated; helpers a module merely imported (np, warn) and the setup.py build files are left out.
Questions
How do I fix "cannot import name 'compare_ssim' from 'skimage.measure'"?
scikit-image 0.18.0 (2020-12-15) removed compare_ssim, compare_psnr, compare_mse and compare_nrmse from skimage.measure; 0.16.2 to 0.17.2 warn when they are called. Use from skimage.metrics import structural_similarity, peak_signal_noise_ratio, mean_squared_error, normalized_root_mse. On the same two images compare_ssim and structural_similarity returned the same number (run in 0.16.2 to 0.17.2). skimage.metrics is in every release from 0.16.2 on. From 0.20.0, structural_similarity on float images raises a ValueError unless you pass data_range= (data_range=1.0 for images scaled 0 to 1); up to 0.19.3 the same call ran without it.
How do I fix "TypeError: ... got an unexpected keyword argument 'multichannel'"?
scikit-image 0.20.0 (2023-02-28) removed the multichannel argument from 25 functions (gaussian, rescale, pyramid_gaussian, slic, hog, denoise_tv_chambolle and others); 0.19.0 to 0.19.3 accept it with a warning. Use channel_axis: multichannel=True becomes channel_axis=-1, and multichannel=False becomes channel_axis=None. Same output for each pair run: gaussian multichannel=True and channel_axis=-1 (0.19.0 to 0.19.3); gaussian multichannel=False and channel_axis=None (0.19.0 to 0.19.3); rescale multichannel=True and channel_axis=-1 (0.19.0 to 0.19.3); structural_similarity multichannel=True and channel_axis=-1 (0.19.0 to 0.19.3). channel_axis itself only exists from 0.19.0, so code that must run on both sides needs a version check. structural_similarity is a special case: it takes **kwargs, so from 0.20.0 multichannel=True is not rejected but ignored, and a color image then fails with "ValueError: win_size exceeds image extent" (run with a 32x32x3 image in 0.20.0 to 0.26.0). Pass channel_axis=-1 there too.
How do I fix "unexpected keyword argument 'selem'" or "No module named 'skimage.morphology.selem'"?
scikit-image 0.20.0 removed the selem argument from 51 functions (skimage.morphology, skimage.filters.rank and a few others), and the skimage.morphology.selem module; 0.19.0 to 0.19.3 accept both with a warning. Write footprint=... instead of selem=..., and import disk, ball and the other shapes from skimage.morphology (or skimage.morphology.footprints, there from 0.19.0). footprint= does not exist before 0.19.0.
How do I fix "module 'skimage.feature' has no attribute 'greycomatrix'"?
scikit-image 0.20.0 removed greycomatrix and greycoprops; 0.19.0 to 0.19.3 have both spellings and warn on the old one. Use graycomatrix and graycoprops (American spelling), which take the same arguments and gave the same matrix in 0.19.x. They exist from 0.19.0, so on 0.18 and older the grey spelling is the only one.
How do I fix "No module named 'skimage.viewer'" or "No module named 'skimage.future.graph'"?
scikit-image 0.20.0 removed both. skimage.future.graph moved to skimage.graph: from skimage import graph, then graph.rag_mean_color, graph.cut_normalized and the rest (same region graph for the same image in 0.19.3 and 0.20.0). skimage.viewer has no replacement inside scikit-image; its own message points to the visualization page of the user guide.
How do I fix "cannot import name 'circle' from 'skimage.draw'"?
scikit-image 0.19.0 (2021-12-03) removed draw.circle; 0.17.1 to 0.18.3 warn. Use draw.disk, which takes the center as one tuple: circle(r, c, radius) becomes disk((r, c), radius). Both gave the same pixels in 0.17.1 to 0.18.3. disk does not exist in 0.16.2.
Sources
- The scikit-image packages on PyPI, installed and run, and their source as installed; the release dates are PyPI's.
- scikit-image's release notes (to cross-read the removals).
The same data as JSON: skimage_names.json, licensed CC BY 4.0.
Related: "module 'cv2' has no attribute ..." · "module 'numpy' has no attribute 'float_'" · "cannot import name 'triu' from 'scipy.linalg'" · "module 'matplotlib.cm' has no attribute 'get_cmap'".