欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Conda - Command reference

程序员文章站 2024-02-11 19:35:40
...

Conda - Command reference

Conda
https://conda.io/projects/conda/en/latest/index.html

Conda
https://conda.io/en/latest/index.html

Miniconda
https://conda.io/en/latest/miniconda.html

Command reference
https://conda.io/projects/conda/en/latest/commands.html

Managing environments
https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

Conda
https://github.com/conda/conda

Conda provides many commands for managing packages and environments. The links on this page provide help for each command. You can also access help from the command line with the --help flag:

conda install --help

1. Conda general commands

The following commands are part of conda:

removal [rɪˈmuːvl]:n. 免职,移动,排除,搬迁
prompt [prɒmpt]:n. 提示,提示符 v. 提示,促使,激起,导致 adj. 迅速,敏捷,准时,立即的 adv. 准时地
  • conda clean
    Removal Targets
    Output, Prompt, and Flow Control Options

  • conda config
    Output, Prompt, and Flow Control Options
    Config File Location Selection
    Config Subcommands
    Config Modifiers

  • conda create
    Positional Arguments
    Named Arguments
    Target Environment Specification
    Channel Customization
    Solver Mode Modifiers
    Package Linking and Install-time Options
    Networking Options
    Output, Prompt, and Flow Control Options

  • conda info
    Named Arguments
    Output, Prompt, and Flow Control Options

  • conda install
    Positional Arguments
    Named Arguments
    Target Environment Specification
    Channel Customization
    Solver Mode Modifiers
    Package Linking and Install-time Options
    Networking Options
    Output, Prompt, and Flow Control Options

  • conda list
    Positional Arguments
    Named Arguments
    Target Environment Specification
    Output, Prompt, and Flow Control Options

  • conda package
    Named Arguments
    Target Environment Specification

  • conda remove
    Positional Arguments
    Named Arguments
    Target Environment Specification
    Channel Customization
    Solver Mode Modifiers
    Networking Options
    Output, Prompt, and Flow Control Options

  • conda search
    Named Arguments
    Channel Customization
    Networking Options
    Output, Prompt, and Flow Control Options

  • conda update
    Positional Arguments
    Named Arguments
    Target Environment Specification
    Channel Customization
    Solver Mode Modifiers
    Package Linking and Install-time Options
    Networking Options
    Output, Prompt, and Flow Control Options

2. Conda vs. pip vs. virtualenv commands

If you have used pip and virtualenv in the past, you can use conda to perform all of the same operations. Pip is a package manager and virtualenv is an environment manager. Conda is both.

  • conda activate only works on conda 4.6 and later versions. For conda versions prior to 4.6, type:
    Windows: activate
    Linux and macOS: source activate

  • conda update python updates to the most recent in the series, so any Python 2.x would update to the latest 2.x and any Python 3.x to the latest 3.x.

Scroll to the right to see the entire table.

scroll [skrəʊl]:v. 滚动,滚屏 n. 卷轴,(石刻或木雕的)  涡卷形装饰

Conda - Command reference

conda list - 列出当前虚拟环境的所有包。
conda env list - 列出 conda 管理的所有虚拟环境。

3. PyCharm 和 conda 虚拟环境连接

Setting -> Project -> Project Interpreter,点击齿轮标志,再点击 Add Local 为添加某个环境的 python.exe 解释器。

Conda - Command reference

learn 虚拟环境中编写程序,修改为 D:\Software\Anaconda\envs\learn,可以看到下面的依赖包也变成了 learn 环境中的包。

Conda - Command reference