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
cannot import name '_validate_lengths' #12744
Comments
Yes, it looks like this disappeared in numpy 1.16.0. But, as you probably noticed, the function has a prepended underscore, meaning that scikit-image was being a bit naughty importing that function. There's a scikit-image issue here: scikit-image/scikit-image#3649 Closing in favor of that issue. |
Thank you @matthew-brett for your quick answer. |
Correct. To give some context, this function came from scikit-image originally, and was ported to NumPy, and we didn't clean up very well afterwards. I think the pain associated with fixing this will be a vivid reminder not to do this again in the future. |
v0.14.2 has been released and addresses the issue. |
Hi, have the same problem. Just update all packages.
Can anybody help me to solve this problem? |
Please report the output of the following:
|
I have this
|
@stefanv would it make sense if he has scikit-image-0.14.2 (in the comment just before yours)? |
Sorry, my brain was clearly on holiday. 0.14.2 fixed this problem, so I imagine another version of the library is being imported. But I don't know how to show that, given that the previous comment states the opposite. |
I have already solved this problem, just use |
That solved it for me |
ImportError: cannot import name '_validate_lengths' from 'numpy.lib.arraypad' (C:\Users\basant\Anaconda3\lib\site-packages\numpy\lib\arraypad.py) |
i have this problem anyone please give the solution for this |
@pandagre Please ensure that you have the latest version of scikit-image installed. If you still experience problems, open a new issue and we'll try to help. |
This works for me, thanks. |
I used conda install -c conda-forge scikit-image but the version I got is 0.14.0. I still have the issue of cannot import name '_validate_lengths' |
@yexing99 Please try and install the latest version of scikit-image and numpy. That combination is known to work. Otherwise, please open a new issue and help us debug your setup there, providing all version numbers. |
|
As conda install is so slow for me, I tried |
pip install -U scikit-image |
Ya same, |
it occurs only with numpy 1.16, numpy 1.15 works fine
Numpy/Python version information:
The text was updated successfully, but these errors were encountered: