服务器中Anaconda3安装与使用

Anaconda3安装与使用

  • 安装
    • 下载Anaconda 3
    • bash命令安装
    • -bash: conda: command not found
  • 使用
    • 创建新环境
    • 添加conda清华源
    • conda常用命令

安装

下载Anaconda 3

下载地址: 清华大学开源软件镜像站
选择合适的Linux 64 位版本下载

bash命令安装

bash Anaconda3-2020.11-Linux-x86_64.sh 

不断回车,使用默认地址安装
服务器中Anaconda3安装与使用_第1张图片

选择yes,完成初始化
服务器中Anaconda3安装与使用_第2张图片

-bash: conda: command not found

若安装结束仍提示conda: command not found,往 /.bashrc 文件末尾追加 anaconda 的路径

echo 'export PATH="/your/path/anaconda3/bin:$PATH"' >> ~/.bashrc

再更新source

source ~/.bashrc

使用

创建新环境

conda create --name vqrf python=3.8

切换conda环境

conda activate vqrf

退出虚拟环境

conda deactivate

添加conda清华源

conda config --add channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'
conda config --add channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/'
conda config --set show_channel_urls yes

conda常用命令

使用conda --help或conda -h,查看conda帮助

Options:

positional arguments:
  command
    clean        Remove unused packages and caches.
    compare      Compare packages between conda environments.
    config       Modify configuration values in .condarc. This is modeled after the git config command. Writes to the user .condarc file (/public/data2/users/aigc1g02/.condarc) by default.
    create       Create a new conda environment from a list of specified packages.
    help         Displays a list of available conda commands and their help strings.
    info         Display information about current conda install.
    init         Initialize conda for shell interaction. [Experimental]
    install      Installs a list of packages into a specified conda environment.
    list         List linked packages in a conda environment.
    package      Low-level conda package utility. (EXPERIMENTAL)
    remove       Remove a list of packages from a specified conda environment.
    uninstall    Alias for conda remove.
    run          Run an executable in a conda environment. [Experimental]
    search       Search for packages and display associated information. The input is a MatchSpec, a query language for conda packages. See examples below.
    update       Updates conda packages to the latest compatible version.
    upgrade      Alias for conda update.

optional arguments:
  -h, --help     Show this help message and exit.
  -V, --version  Show the conda version number and exit.

你可能感兴趣的:(环境配置,Experiments,python,linux,服务器)