ImportError: cannot import name '_validate_lengths'

蹲街弑〆低调 提交于 2019-11-30 16:46:36

I updated my skimage package.

pip install --upgrade scikit-image

And the problem was solved. It's a problem of version of Skimage, which is solved in 0.14.2. PLus, this version is quite stable.

    Installing collected packages: dask, scikit-image
  Found existing installation: dask 0.19.1
    Uninstalling dask-0.19.1:
      Successfully uninstalled dask-0.19.1
  Found existing installation: scikit-image 0.13.0
    Uninstalling scikit-image-0.13.0:
      Successfully uninstalled scikit-image-0.13.0
Successfully installed dask-1.0.0 scikit-image-0.14.2

scikit-image 0.14.2 worked with numpy 1.16.3. I installed numpy first and then installed scikit image

pip install scikit-image==0.14.2 && pip install numpy==1.15

Ref: Here

I had the same error, I did the following steps:

uninstall scikit-image

pip uninstall scikit-image

or

conda uninstall scikit-image

and then

pip install scikit-image

or

conda install -c conda-forge scikit-image
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!