取消ubuntu终端启动后自动进入conda的base环境

在ubuntu上安装了Anaconda之后,每次启动终端就会自动进入conda的base环境,可以通过如下指令退出conda环境:

conda deactivate

但是考虑到每次都需要执行这一步才能退出,比较麻烦,因此想要启动终端后不进入conda环境。网上推荐通过修改conda的config文件来实现:

conda config --set auto_activate_base false

但是,我这里并没有用,启动之后还是会自动进入conda的base环境。最后的解决方案是,直接修改conda的配置文件来实现:

sudo vi ~/.condarc

在最后一行补充:

auto_activate_base: false

至此,完成。

通过“conda -h”查询具体的设置:

usage: conda [-h] [-V] command ...

conda is a tool for managing and deploying applications, environments and packages.

Options:

positional arguments:
  command
    clean        Remove unused packages and caches.
    config       Modify configuration values in .condarc. This is modeled
                 after the git config command. Writes to the user .condarc
                 file (/home/XXX/.condarc)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值