下载Anaconda安装文件

  • 到清华镜像源下载Anaconda
    https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/?C=M&O=D
  • 选择2021.11版本
    https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2021.11-Linux-x86_64.sh
  • 将文件上传到CentOS中。

安装Anaconda

root@ecs-9e76 ~]# ls
Anaconda3-2020.02-Linux-x86_64.sh
  • 运行安装文件
[root@ecs-9e76 ~]# bash Anaconda3-2020.02-Linux-x86_64.sh 

Welcome to Anaconda3 2020.02
  • 输入回车继续安装
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> 
  • 输入yes同意安装
Do you accept the license terms? [yes|no]
[no] >>> yes
  • 选择安装位置
    • 回车,默认安装在/root/anaconda3
    • 也可以自己指定安装位置
Anaconda3 will now be installed into this location:
/root/anaconda3

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

[/root/anaconda3] >>> 
  • 回车,安装在默认位置
[/root/anaconda3] >>> 
PREFIX=/root/anaconda3
Unpacking payload ...
Preparing transaction: done
Executing transaction: done
installation finished.
  • 是否初始化conda
Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
[no] >>> 
no change     /root/anaconda3/condabin/conda
no change     /root/anaconda3/bin/conda
no change     /root/anaconda3/bin/conda-env
no change     /root/anaconda3/bin/activate
no change     /root/anaconda3/bin/deactivate
no change     /root/anaconda3/etc/profile.d/conda.sh
no change     /root/anaconda3/etc/fish/conf.d/conda.fish
no change     /root/anaconda3/shell/condabin/Conda.psm1
no change     /root/anaconda3/shell/condabin/conda-hook.ps1
no change     /root/anaconda3/lib/python3.7/site-packages/xontrib/conda.xsh
no change     /root/anaconda3/etc/profile.d/conda.csh
modified      /root/.bashrc


==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup, 
   set the auto_activate_base parameter to false: 

conda config --set auto_activate_base false

Thank you for installing Anaconda3!

===========================================================================

Anaconda and JetBrains are working together to bring you Anaconda-powered
environments tightly integrated in the PyCharm IDE.

PyCharm for Anaconda is available at:
https://www.anaconda.com/pycharm

重启shell

重启shell,完成Anaconda安装,使配置生效,否则conda命令无法使用。

验证安装

[root@ecs-9e76 ~]# conda info

     active environment : None
            shell level : 0
       user config file : /root/.condarc
 populated config files : 
          conda version : 4.8.2
    conda-build version : 3.18.11
         python version : 3.7.6.final.0
       virtual packages : __glibc=2.17
       base environment : /root/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /root/anaconda3/pkgs
                          /root/.conda/pkgs
       envs directories : /root/anaconda3/envs
                          /root/.conda/envs
               platform : linux-64
             user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.6 Linux/3.10.0-1160.15.2.el7.x86_64 centos/7.6.1810 glibc/2.17
                UID:GID : 0:0
             netrc file : None
           offline mode : False

激活虚拟环境

[root@ecs-9e76 ~]# conda activate
(base) [root@ecs-9e76 ~]# 

退出虚拟环境

(base) [root@ecs-9e76 ~]# conda deactivate
[root@ecs-9e76 ~]#
GitHub 加速计划 / li / linux-dash
6
1
下载
A beautiful web dashboard for Linux
最近提交(Master分支:3 个月前 )
186a802e added ecosystem file for PM2 4 年前
5def40a3 Add host customization support for the NodeJS version 4 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐