如何仅在需要时初始化conda环境?

问题描述

我在Linux上,并且使用了鱼壳。我已经安装了Conda,而不是Anaconda,因为我仅在终端机内工作。我是Conda的新手。我需要两个版本的python,因此我创建了两个工作环境。

要在两种环境之间切换,我发出命令

~ $ conda activate myenv

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell,run

    $ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.

当我做conda init fish时,我一切正常。但是鱼的启动时间大大增加。即使我不打算在python项目上工作,fish也会提示更改。看起来像这样,

~$                                                                   (base)

我是大量的终端用户,我每天都会打开和关闭数百个终端。缓慢的启动时间会随着时间而增加。而且大多数时候我什至不使用python。因此,即使我没有做任何与conda相关的事情,我也感到conda显示环境很烦人。

我希望conda仅在需要或在conda目录中工作时才显示该信息(并更改提示)。我希望它的行为像git,仅在git目录内更改提示。我该怎么办?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...