gpt4 book ai didi

anaconda - 重置 conda channel 优先级

转载 作者:行者123 更新时间:2023-12-03 20:13:46 28 4
gpt4 key购买 nike

我在使用 conda 时遇到问题。运行命令后,例如:

conda install -c /my_conda_channel numpy --offline --override-channels

默认的 conda channel 现在变成了“my_conda_channel”,因此该 channel 的每个后续包都会取代默认 channel ,这不是我想要的。我做前者只是为了测试目的。

如何重置 channel 行为?

最佳答案

~/.condarc 更改订单以便 defaults第一个 channel 作为

channels:
- defaults
- conda-forge

并将这一行添加到它
channel_priority: true

或在命令行中运行以下代码
conda config --set channel_priority true

然后再次运行
conda update --all

祝你好运

针对新版本的 conda 进行了编辑。根据 conda doc

As of version 4.6.0, Conda has a strict channel priority feature. Strict channel priority can dramatically speed up conda operations and also reduce package incompatibility problems. We recommend it as a default. However, it may break old environment files, so we plan to delay making it conda's out-of-the-box default until the next major version bump, conda 5.0.

channel_priority (ChannelPriority)
Accepts values of 'strict', 'flexible', and 'disabled'.


它仍然接受旧值 truefalse
  • true := flexible
  • false := disabled
  • strict := 这是一个新值
  • 关于anaconda - 重置 conda channel 优先级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48547046/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com