Numpy: cannot import name 'img_as_float32'

Created on 5 May 2019  路  1Comment  路  Source: numpy/numpy

I cannot import skimage correctly. Something strange is that even though I have downloaded the latest scikit-image (0.15.0), my skimage version is still 0.13.0. I am not sure how that happened.

import skimage.color

### Error message

ImportError Traceback (most recent call last)
in
----> 1 import skimage.color

~/anaconda3_501/lib/python3.6/site-packages/skimage/color/__init__.py in
----> 1 from .colorconv import (convert_colorspace,
2 guess_spatial_dimensions,
3 rgba2rgb,
4 rgb2hsv,
5 hsv2rgb,

~/anaconda3_501/lib/python3.6/site-packages/skimage/color/colorconv.py in
54 import numpy as np
55 from scipy import linalg
---> 56 from ..util import dtype, dtype_limits
57
58

~/anaconda3_501/lib/python3.6/site-packages/skimage/util/__init__.py in
----> 1 from .dtype import (img_as_float32, img_as_float64, img_as_float,
2 img_as_int, img_as_uint, img_as_ubyte,
3 img_as_bool, dtype_limits)
4 from .shape import view_as_blocks, view_as_windows
5 from .noise import random_noise

ImportError: cannot import name 'img_as_float32'

Numpy/Python version information:

scikit-image (version = 0.15.0)
numpy (version =1.16.2)

Most helpful comment

I was able to resolve the issue by restarting the kernel -- the upgraded scikit-image version didn't get passed over to skimage, which was why I got the error.聽

>All comments

I was able to resolve the issue by restarting the kernel -- the upgraded scikit-image version didn't get passed over to skimage, which was why I got the error.聽

Was this page helpful?
0 / 5 - 0 ratings

Related issues

keithbriggs picture keithbriggs  路  3Comments

Kreol64 picture Kreol64  路  3Comments

Levstyle picture Levstyle  路  3Comments

manuels picture manuels  路  3Comments

astrofrog picture astrofrog  路  4Comments