New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_validate_lengths replaced in numpy 1.16 leading to ImportError exception in scikit-image less than 0.14.2 #3551

Closed
pllim opened this Issue Nov 16, 2018 · 5 comments

Comments

Projects
None yet
6 participants
@pllim
Copy link

pllim commented Nov 16, 2018

Description

As seen in https://travis-ci.org/astropy/astropy/jobs/455917279 , from skimage.measure import block_reduce caused ImportError when used with numpy dev.

    from skimage.measure import block_reduce
  File ".../skimage/measure/__init__.py", line 3, in <module>
    from ._marching_cubes_classic import (marching_cubes_classic,
  File ".../skimage/measure/_marching_cubes_classic.py", line 3, in <module>
    from .._shared.utils import warn
  File ".../skimage/_shared/utils.py", line 10, in <module>
    from ..util import img_as_float
  File ".../skimage/util/__init__.py", line 8, in <module>
    from .arraycrop import crop
  File ".../skimage/util/arraycrop.py", line 8, in <module>
    from numpy.lib.arraypad import _validate_lengths
ImportError: cannot import name '_validate_lengths'

from numpy.lib.arraypad import _validate_lengths

Caused by numpy/numpy#11966

Way to reproduce

[If reporting a bug, please include the following important information:]

  • Code example
  • Relevant images (if any)
  • Operating system and version -- Linux-4.14.12-041412-generic-x86_64-with-debian-jessie-sid
  • Python version -- 3.6.6
  • scikit-image version (run skimage.__version__) -- 0.14.0

All the info is in https://travis-ci.org/astropy/astropy/jobs/455917279 .

@sciunto

This comment has been minimized.

Copy link
Member

sciunto commented Nov 17, 2018

Thanks for reporting!

@sciunto sciunto changed the title block_reduce cannot import name _validate_lengths _validate_lengths removed in numpy/master leading to ImportError exception Nov 17, 2018

@sciunto sciunto changed the title _validate_lengths removed in numpy/master leading to ImportError exception _validate_lengths replaced in numpy/master leading to ImportError exception Nov 17, 2018

sciunto added a commit to sciunto/scikit-image that referenced this issue Nov 18, 2018

@sciunto sciunto referenced this issue Nov 18, 2018

Merged

Handle deprecation of numpy `_validate_lengths` #3556

0 of 9 tasks complete

sciunto added a commit to sciunto/scikit-image that referenced this issue Nov 18, 2018

sciunto added a commit to sciunto/scikit-image that referenced this issue Nov 19, 2018

sciunto added a commit to sciunto/scikit-image that referenced this issue Nov 19, 2018

@olebole olebole referenced this issue Dec 30, 2018

Closed

[0.14.1] Test failures with new numpy #3630

4 of 5 tasks complete
@samohant

This comment has been minimized.

Copy link

samohant commented Feb 15, 2019

Tried all still getting the below issue:
from numpy.lib.arraypad import _validate_lengths
ImportError: cannot import name '_validate_lengths' from 'numpy.lib.arraypad'
Python Version : 1.16.1

@stefanv

This comment has been minimized.

Copy link
Member

stefanv commented Feb 15, 2019

@samohant Please file a new issue, and fill out the issue template provided. Thanks!

@jni

This comment has been minimized.

Copy link
Contributor

jni commented Feb 15, 2019

@samohant I suspect that you have scikit-image <0.14.2. Please install the latest version of scikit-image.

@hmaarrfk hmaarrfk changed the title _validate_lengths replaced in numpy/master leading to ImportError exception _validate_lengths replaced in numpy 1.16 leading to ImportError exception in scikit-image less than 0.14.2 Feb 15, 2019

@hmaarrfk

This comment has been minimized.

Copy link
Member

hmaarrfk commented Feb 15, 2019

Once again, I'm going to close this issue because we have addressed the original request quiet extensively. If anybody does have similar installation issues, please make sure you have installed scikit-image 0.14.2. If that doesn't help, please open a new issue and we will gladly help you troubleshoot.

@scikit-image scikit-image locked as resolved and limited conversation to collaborators Feb 15, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.