报错
import skimage
报错
ModuleNotFoundError: No module named ‘skimage‘
然后试图直接搜索skimage安装
conda环境
conda install skimage
pip环境
pip install skimage
都报错。解决方法是一样的,可以直接跳到解决方法那里看。在此之前还是啰嗦一下,列出具体的报错。
conda报错
PackagesNotFoundError: The following packages are not available from current channels:
- skimage
或者
pip报错
(老版本)可能是
Could not find a version that satisfies the requirement skimage (from versions: )……
(新版本)也可能是
Looking in indexes: https://mirrors.ustc.edu.cn/pypi/web/simple
Collecting skimage
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/3b/ee/edbfa69ba7b7d9726e634bfbeefd04b5a1764e9e74867ec916113eeaf4a1/skimage-0.0.tar.gz (757 bytes)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [3 lines of output]
*** Please install the `scikit-image` package (instead of `skimage`) ***
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
解决方法
换成下载scikit-image包,skimage属于这个包,下载这个包才能import skimage。
conda环境
conda install scikit-image
pip环境
pip install scikit-image