ImportError when importing skimage subpackages
Josh Warner
silvertrumpet999 at gmail.com
Fri Jul 3 15:20:15 EDT 2015
What is your Cython version? Older versions of Cython don't like relative
imports in .pyx files.
I suspect the Cython extensions in the package are not built. Are your pip
installs completing successfully? Our full installation instructions are
located here: http://scikit-image.org/docs/stable/install.html
Also, make sure your pip installs are going into
`/usr/local/lib/python2.7/dist-packages/`. If not, then an older, unbuilt
version of skimage in that location may be ahead of your newer ones on the
PYTHONPATH so your subsequent, successful installations are not being used.
Josh
On Friday, July 3, 2015 at 1:49:21 PM UTC-5, Weixun Goh wrote:
>
> I'm running into some issues after upgrading scikit-image, so I tried
> uninstalling and reinstalling, and it just doesn't seem to work.
>
>
> When I try to import skimage.feature, I run into the following issue:
>
>
> ---------------------------------------------------------------------------
>>
>> ImportError Traceback (most recent call
>> last)
>>
>> <ipython-input-3-9ed3c50fda3e> in <module>()
>>
>> ----> 1 from skimage import feature
>>
>>
>> /usr/local/lib/python2.7/dist-packages/skimage/feature/__init__.py in
>> <module>()
>>
>> 1 from ._canny import canny
>>
>> ----> 2 from ._daisy import daisy
>>
>> 3 from ._hog import hog
>>
>> 4 from .texture import (greycomatrix, greycoprops,
>>
>> 5 local_binary_pattern,
>>
>>
>> /usr/local/lib/python2.7/dist-packages/skimage/feature/_daisy.py in
>> <module>()
>>
>> 2 from scipy import sqrt, pi, arctan2, cos, sin, exp
>>
>> 3 from scipy.ndimage import gaussian_filter
>>
>> ----> 4 from .. import img_as_float, draw
>>
>> 5 from ..color import gray2rgb
>>
>> 6 from .._shared.utils import assert_nD
>>
>>
>> /usr/local/lib/python2.7/dist-packages/skimage/draw/__init__.py in
>> <module>()
>>
>> ----> 1 from .draw import circle, ellipse, set_color
>>
>> 2 from .draw3d import ellipsoid, ellipsoid_stats
>>
>> 3 from ._draw import (line, line_aa, polygon, ellipse_perimeter,
>>
>> 4 circle_perimeter, circle_perimeter_aa,
>>
>> 5 _bezier_segment, bezier_curve)
>>
>>
>> /usr/local/lib/python2.7/dist-packages/skimage/draw/draw.py in <module>()
>>
>> 1 # coding: utf-8
>>
>> 2 import numpy as np
>>
>> ----> 3 from ._draw import _coords_inside_image
>>
>> 4
>>
>> 5
>>
>>
>> /scratch/repo/_draw.pyx in init skimage.draw._draw
>> (skimage/draw/_draw.c:23752)()
>>
>>
>> ImportError: No module named _shared.geometry
>>
>
> Same thing happens with filters and filter
>
> ---------------------------------------------------------------------------
>> ImportError Traceback (most recent call
>> last)
>> <ipython-input-9-6bd277fca327> in <module>()
>> ----> 1 import skimage.filters
>> /usr/local/lib/python2.7/dist-packages/skimage/filters/__init__.py in
>> <module>()
>> 11 from .thresholding import (threshold_adaptive, threshold_otsu,
>> threshold_yen,
>> 12 threshold_isodata, threshold_li)
>> ---> 13 from . import rank
>> 14 from .rank import median
>> 15
>> ImportError: cannot import name rank
>
>
> Importing skimage.viewer gives me:
>
> ImportError: cannot import name _coords_inside_image
>
> Those are all that I have tried. skimage.utils works fine.
>
> I'm running the numpy and scipy packages provided by Ubuntu, and have
> tried both installing scikit-image using the pip packages as well as
> downloading from github then installing pip.
>
> Would be great if someone could shed some light on this.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20150703/b7d12397/attachment.html>
More information about the scikit-image
mailing list