1. Anaconda安装文件下载:
清华镜像(Index of /anaconda/archive/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror)
wget --user-agent="Mozilla" https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2024.02-1-Linux-x86_64.sh
2.将 Anaconda3-5.3.1-Linux-x86_64.sh 放置到主目录
3. Terminal 运行:
bash Anaconda3-5.3.1-Linux-x86_64.sh
4. 验证安装
conda -V
5. 若是报错:“conda is not a command” 错误,可能是安装过程中环境变量没添加。
手工添加环境变量下:
nano ~/.bashrc
最后一行添加:export PATH=$PATH:/home/coco/anaconda3/bin (coco是我的用户名,修改成你自己的用户名) 保存退出后运行:
source ~/.bashrc
6. 开启anaconda图形化界面:
方法一:
$ conda install -c anaconda anaconda-navigator
$ anaconda-navigator
方法二:
source ~/anaconda3/bin/activate root
anaconda-navigator
7. 若出现访问conda.anaconda.org超时,可更换国内镜像:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
查看源:
conda config --show
恢复默认源:
conda config --remove-key channels