anaconda - 重置 conda channel 优先级

标签 anaconda conda channel

我在使用 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/

    相关文章:

    python - 为什么在使用 'conda update --all' 时出现以下错误以及如何修复它?

    python - 序号 242 无法定位到动态链接库 Anaconda3\Library\bin\mkl_intel_thread.dll

    去 channel 无限循环

    go - 可执行程序在跨越空 channel 时抢先退出

    Python 找不到已安装的模块

    ipython - anaconda ipython 笔记本未在服务器设置中启动

    python - 创建Conda环境时出现 `ResolvePackageNotFound`错误如何解决?

    conda - conda-forge 和 cf-staging channel 有什么区别

    python - Anaconda:如何安装不在 Anaconda 目录中的软件包?

    asynchronous - 不再使用时是否应该关闭 clojure core.async channel ?