Import error when importing from skimage.transform

Juan Nunez-Iglesias jni.soma at gmail.com
Fri Jun 24 14:30:59 EDT 2016


This usually has to do with an incorrect build of scikit-image. Can you
tell us how you "reinstalled" scikit-image? My guess is that you either:

- did not actually compile the Cython files (pyx -> c -> so), or
- compiled in-place but did not install to your Python environment, or
- compiled and installed to Python environment but running from
scikit-image source directory, which often causes Python's import machinery
to get confused.

If you can give us more details about your Python install and how you're
running your notebook, we might be able to help diagnose the problem!

One nice trick to do is:

>>> import skimage
>>> skimage

The output should show you *which* skimage file you are loading when
importing.

Juan.

On Thu, Jun 23, 2016 at 8:30 PM, <sja353 at nyu.edu> wrote:

> The environment I'm using is a Jupyter notebook running python 3.5. I can import other packages, but importing anything from skimage.transform results in the following error:
>
>
> ImportError                               Traceback (most recent call last)<ipython-input-19-741b6a154664> in <module>()----> 1 from skimage.transform import resize
> /home/jupyter/anaconda3/envs/py35/lib/python3.5/site-packages/skimage/transform/__init__.py in <module>()----> 1 from .hough_transform import (hough_line, hough_line_peaks,      2                               probabilistic_hough_line, hough_circle,      3                               hough_ellipse)      4 from .radon_transform import radon, iradon, iradon_sart      5 from .finite_radon_transform import frt2, ifrt2
> /home/jupyter/anaconda3/envs/py35/lib/python3.5/site-packages/skimage/transform/hough_transform.py in <module>()      2 from scipy import ndimage as ndi      3 from .. import measure----> 4 from ._hough_transform import (_hough_circle,      5                                hough_ellipse as _hough_ellipse,      6                                hough_line as _hough_line,
> ImportError: cannot import name '_hough_circle'
>
>
> We've already tried uninstalling skimage, updating cython and then re-installing. Anyone else encounter this problem?
>
> --
> You received this message because you are subscribed to the Google Groups
> "scikit-image" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to scikit-image+unsubscribe at googlegroups.com.
> To post to this group, send email to scikit-image at googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/scikit-image/d7a8d058-2202-424e-b6b4-b4cd85c1811e%40googlegroups.com
> <https://groups.google.com/d/msgid/scikit-image/d7a8d058-2202-424e-b6b4-b4cd85c1811e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20160624/3a8aac6f/attachment.html>


More information about the scikit-image mailing list