当前位置:   article > 正文

from numpy.lib.arraypad import _validate_length : ImportError: cannot import name ‘_validate_lengths

from numpy.lib.arraypad import _validate_length : ImportError: cannot import name ‘_validate_lengths

@abhinavsagar I'm going to close this for the moment as I think @hmaarrfk is right that this is the same issue as #3649. Specifically, scikit-image 0.14.{0,1} are incompatible with NumPy 1.16.0 and higher. The solution is either:

  • upgrade scikit-image to 0.14.2 or 0.15.0, OR
  • downgrade NumPy to 1.15.

Please reopen the issue if these options don't fix the problem for you!

source: https://github.com/scikit-image/scikit-image/issues/3906#issuecomment-492039622

即这个问题大概率是因为Numpy版本和scikit-image版本不匹配导致的,解决方法:

把scikit升级到0.14.2以上。

 

事实上,我根本没有装scikit-image,因此(Anaconda)只需执行下面命令即可解决:

conda install -c conda-forge scikit-image

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/657826
推荐阅读
相关标签
  

闽ICP备14008679号