1. 官方下载.sh文件
2. 控制台输入命令 bash xx.sh
进行安装
3. 快速阅读和跳过知情内容可以按d
,vscode可根据个人需要选择是否安装
4. 环境配置
\quad
控制台输入vim ~/.bashrc
\quad
\quad
按 i
进入vim编辑,在最后一行添加anaconda的安装路径,
\quad
\quad
export PATH="/... 你的路径../anaconda3/bin/:$PATH"
\quad
\quad
按Esc键,再输入 :wq
退出
\quad
控制台输入再输入source ~/.bashrc
5. conda info -e 可以检测环境是否配置完毕
6. 如果使用 conda activate xxx 激活虚拟环境报以下错误,首先确认第4步中.bashrc修改之后是否在控制台输入过 source ~/.bashrc
,没有则需要输入该行命令。或者,需要先激活 anaconda 环境,即控制台输入source activate
即可,相应的退出anaconda 环境需要输入source deactivate
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If your shell is Bash or a Bourne variant, enable conda for the current user with
$ echo ". /root/anaconda3/etc/profile.d/conda.sh" >> ~/.bashrc
or, for all users, enable conda with
$ sudo ln -s /root/anaconda3/etc/profile.d/conda.sh /etc/profile.d/conda.sh
The options above will permanently enable the 'conda' command, but they do NOT
put conda's base (root) environment on PATH. To do so, run
$ conda activate
in your terminal, or to put the base environment on PATH permanently, run
$ echo "conda activate" >> ~/.bashrc
Previous to conda 4.4, the recommended way to activate conda was to modify PATH in
your ~/.bashrc file. You should manually remove the line that looks like
export PATH="/root/anaconda3/bin:$PATH"
^^^ The above line should NO LONGER be in your ~/.bashrc file! ^^^
conda激活虚拟环境报错解决: https://blog.csdn.net/u013515929/article/details/115267360
vim 编辑基础: https://blog.csdn.net/u013515929/article/details/109584586