Henry
发布于 2025-02-24 / 23 阅读
0
0

Conda - Debian 安装

背景简介

学习 Python 时建议通过 Conda 进行环境管理,因此安装Conda。

环境配置

  1. 系统:Debian 6.1.66-1 (2023-12-09) x86_64 GNU/Linux

详细步骤

下载安装包

进入连接查询并下载所需要版本的安装包,我的是Linux版本,故选择了:Anaconda3-2023.07-2-Linux-x86_64.sh

https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/?C=M&O=D

添加执行脚本权限

$ sudo chmod +x Anaconda3-2023.07-2-Linux-x86_64.sh
  • +x:添加可执行权限

执行脚本

$ sudo  ./Anaconda3-2023.07-2-Linux-x86_64.sh 

Welcome to Anaconda3 2023.07-2

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> 

根据提示安装即可

安装完成后提示如下

......
......
done
installation finished.
Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
[no] >>> yes
no change     /home/myname/anaconda3/condabin/conda
no change     /home/myname/anaconda3/bin/conda
no change     /home/myname/anaconda3/bin/conda-env
no change     /home/myname/anaconda3/bin/activate
no change     /home/myname/anaconda3/bin/deactivate
no change     /home/myname/anaconda3/etc/profile.d/conda.sh
no change     /home/myname/anaconda3/etc/fish/conf.d/conda.fish
no change     /home/myname/anaconda3/shell/condabin/Conda.psm1
no change     /home/myname/anaconda3/shell/condabin/conda-hook.ps1
no change     /home/myname/anaconda3/lib/python3.11/site-packages/xontrib/conda.xsh
no change     /home/myname/anaconda3/etc/profile.d/conda.csh
modified      /home/myname/.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!

请根据自身需求输入提示词

查看安装结果

再次启动 命令行界面会有如下显示

(base) myname@myserver:~$ 

命令行前面会有(base)字样

用help指令查看conda的帮助文档

(base) myname@myserver:~$ conda --help
usage: conda [-h] [--no-plugins] [-V] COMMAND ...

conda is a tool for managing and deploying applications, environments and packages.

options:
  -h, --help          Show this help message and exit.
  --no-plugins        Disable all plugins that are not built into conda.
  -V, --version       Show the conda version number and exit.

commands:
  The following built-in and plugins subcommands are available.

  COMMAND
    build             Build conda packages from a conda recipe.
    clean             Remove unused packages and caches.
    compare           Compare packages between conda environments.
    config            Modify configuration values in .condarc.
    content-trust     See `conda content-trust --help`.
    convert           Convert pure Python packages to other platforms (a.k.a.,
                      subdirs).
    create            Create a new conda environment from a list of specified
                      packages.
    debug             Debug the build or test phases of conda recipes.
    develop           Install a Python package in 'development mode'. Similar
                      to `pip install --editable`.
    doctor            Display a health report for your environment.
    env               See `conda env --help`.
    index             Update package index metadata files. Pending
                      deprecation, use https://github.com/conda/conda-index
                      instead.
    info              Display information about current conda install.
    init              Initialize conda for shell interaction.
    inspect           Tools for inspecting conda packages.
    install           Install a list of packages into a specified conda
                      environment.
    list              List installed packages in a conda environment.
    metapackage       Specialty tool for generating conda metapackage.
    notices           Retrieve latest channel notifications.
    pack              See `conda pack --help`.
    package           Create low-level conda packages. (EXPERIMENTAL)
    remove (uninstall)
                      Remove a list of packages from a specified conda
                      environment.
    rename            Rename an existing environment.
    render            Expand a conda recipe into a platform-specific recipe.
    repo              See `conda repo --help`.
    run               Run an executable in a conda environment.
    search            Search for packages and display associated information
                      using the MatchSpec format.
    server            See `conda server --help`.
    skeleton          Generate boilerplate conda recipes.
    token             See `conda token --help`.
    update (upgrade)  Update conda packages to the latest compatible version.
    verify            See `conda verify --help`.

以上便是本文的全部内容,感谢您的阅读。



评论