Linux-Centos7下安装Anaconda

1.创建目录

mkdir -p /usr/local/Anaconda/catalogue /usr/local/Anaconda/install
cd /usr/local/Anaconda

2.下载

wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh

3.安装Anaconda

bash Anaconda3-2020.11-Linux-x86_64.sh

Welcome to Anaconda3 2020.11

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> yes   # 接受anaconda的条款

/root/anaconda3
  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/root/anaconda3] >>>/usr/local/Anaconda/install  # 设置安装目录

Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
[no] >>> yes  # 安装完成初始化conda(一般更新当前用户的bashrc),输入yes,回车。

4.添加(/usr/local/Anaconda/install/bin)到系统环境变量文件(/etc/profile)中

vim /etc/profile  source /etc/profile
export PATH=/usr/local/Anaconda/install/bin:$PATH

5.测试是否安装成功

conda --version或conda -V

6.常用的conda命令

【基本命令】
conda update -n base conda         //update最新版本的conda
conda create -n xxxx python=3.6   //创建python3.6的xxxx虚拟环境
conda activate xxxx               //开启xxxx环境
conda deactivate                  //关闭环境
conda env list                    //显示所有的虚拟环境
conda remove -n xxxx --all       //删除虚拟环境,删除已创建的xxxx虚拟环境
【升级】
conda update conda
conda update anaconda
conda update anaconda-navigator    //update最新版本的anaconda-navigator
【卸载】
rm -rf /usr/local/Anaconda/install    卸载视安装目录而定!
【清理conda】
conda clean -p      //删除没有用的包
conda clean -t      //tar打包

  

 

Linux-Centos7下安装Anaconda

上一篇:比较文件命令之diff,patch,vimdiff,cmp


下一篇:Linux发行版及其目标用户