pip、conda找不到包skimage解决 换成scikit-image下载

当尝试导入skimage模块时遇到ModuleNotFoundError,无论是conda还是pip安装都失败。错误提示表明应安装scikit-image包,而非skimage。解决方案是使用conda或pip安装scikit-image。
摘要由CSDN通过智能技术生成

报错

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值