强制 conda 更新包而不降级其他包,忽略任何可能的不良副作用

Forcing conda to update package without downgrading others, ignoring any possible bad side effects

尝试更新 conda 给出

The following packages will be UPDATED:

  prompt_toolkit                                2.0.10-py_0 --> 3.0.0-py_0

The following packages will be DOWNGRADED:

  jupyter_console                              6.0.0-py37_0 --> 5.2.0-py37_1

假设我想在不降级 jupyter 的情况下更新 prompt_toolkit。我知道如果 jupyter-console 需要 prompt_toolkit< 3.0 我可能会过得很糟糕,但如果我想冒这个风险怎么办?

是否有像 conda update prompt_toolkit=3.0.0-py_0 --only-look-at-this 这样的命令,其中 conda 会盲目安装 prompt_toolkit,甚至不查看依赖它的东西?

来自 conda 更新 docs:

--no-deps

Do not install, update, remove, or change dependencies. This WILL lead to broken environments and inconsistent behavior. Use at your own risk.

或者,如果您想安装新的依赖项,但不想更改已安装的依赖项:

--freeze-installed, --no-update-deps

Do not update or change already-installed dependencies.