在ubuntu上安装了Anaconda以后,每次启动终端都会手动步入conda的base环境linux默认启动命令行,可以通过如下指令退出conda环境:
conda deactivate
并且考虑到每次都须要执行这一步能够退出,比较麻烦linux定时器,因而想要启动终端后不步入conda环境。网上推荐通过更改conda的config文件来实现:
conda config --set auto_activate_base false
然而鸟哥的linux私房菜,我这儿并没有用,启动以后还是会手动步入conda的base环境。最后的解决方案是,直接更改conda的配置文件来实现:
sudo vi ~/.condarc
在最后一行补充:
auto_activate_base: false
至此linux默认启动命令行,完成。
通过“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.