安装Anaconda
要安装Anaconda,先从Anaconda的官方网站下载安装脚本。
对应版本:https://repo.anaconda.com/archive/?C=M&O=A
$ wget https://mirrors.bfsu.edu.cn/anaconda/archive/Anaconda3-2022.10-Linux-x86_64.sh --no-check-certificate
运行
$ bash Anaconda3-2021.11-Linux-x86_64.sh
配置环境变量
如果您在安装过程中选择了将Anaconda添加到PATH环境变量,这一步可以跳过。否则,您需要手动添加。打开您的/.bashrc或/.zshrc文件,并添加以下行:
export PATH="/path/to/anaconda3/bin:$PATH"
之后,运行source ~/.bashrc或source ~/.zshrc来使更改生效。
还可以控制 shell 在每次打开时是否激活了基础环境
# The base environment is activated by default
conda config --set auto_activate_base True
# The base environment is not activated by default
conda config --set auto_activate_base False
# The above commands only work if conda init has been run first
# conda init is available in conda versions 4.6.12 and later
就这么简单,无了, 跳转 Anaconda 常用命令吧