conda环境安装scipy及scikit-image

一些相关的博客

最近的一些工作要用到scikit-image包,pip一直安装不成功,就用conda环境安装,简单记录下安装的过程。

  • 首先进入要安装\包的环境,具体操作可参考之前的文章。
  • 尝试安装scipy,遇到问题(Conda 无法找到所需的 scikit-image 渠道)
(Pytorch) C:\Users\user>conda install -c anaconda scipy
Collecting package metadata (current_repodata.json): failed

UnavailableInvalidChannel: HTTP 404 NOT FOUND for channel scikit-image <https://conda.anaconda.org/scikit-image>

The channel is not accessible or is invalid.

You will need to adjust your conda configuration to proceed.
Use `conda config --show channels` to view your configuration's current state,
and use `conda config --show-sources` to view config file locations.
  • 查看conda配置状态
conda config --show channels

结果为:

(Pytorch) C:\Users\user>conda config --show channels
channels:
  - conda-forge
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - scikit-image
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/peterjc123/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
  - defaults

看起来 Conda 渠道配置包含了一些镜像源以及一些特定的渠道。

现在可以按照以下步骤操作:

  • 检查渠道配置,看看是否有无效或错误的渠道。在这里,似乎 scikit-image 渠道可能无效,因为在安装 scipy 时遇到了问题。可以使用以下命令删除它:
conda config --remove channels scikit-image
  •  添加正确的渠道:确保有 PyTorch 渠道,如果没有,可以手动添加:
conda config --add channels pytorch
  • 再次运行安装命令:
conda install -c anaconda scipy
  • scikit-image包也是如上安装方法
  • conda install -c conda-forge scikit-image
    

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值