取消ubuntu终端启动后自动进入conda的base环境
在ubuntu上安装了Anaconda之后,每次启动终端就会自动进入conda的base环境,可以通过如下指令退出conda环境:conda deactivate但是考虑到每次都需要执行这一步才能退出,比较麻烦,因此想要启动终端后不进入conda环境。网上推荐通过修改conda的config文件来实现:conda config --set auto_activate_base false但是,我这
·
在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) by default.
create Create a new conda environment from a list of specified
packages.
help Displays a list of available conda commands and their help
strings.
info Display information about current conda install.
init Initialize conda for shell interaction. [Experimental]
install Installs a list of packages into a specified conda
environment.
list List linked packages in a conda environment.
package Low-level conda package utility. (EXPERIMENTAL)
remove Remove a list of packages from a specified conda environment.
uninstall Alias for conda remove.
run Run an executable in a conda environment. [Experimental]
search Search for packages and display associated information. The
input is a MatchSpec, a query language for conda packages.
See examples below.
update Updates conda packages to the latest compatible version.
upgrade Alias for conda update.
optional arguments:
-h, --help Show this help message and exit.
-V, --version Show the conda version number and exit.
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)