安装 conda#

Installing conda

若要安装 conda,首先需要选择适合你的安装程序。以下是当前最常用的一些安装程序:

To install conda, you must first pick the right installer for you. The following are the most popular installers currently available:

Miniconda#

Miniconda 是由 Anaconda 提供的一个精简版安装器。如果你希望自己手动安装大部分软件包,推荐使用此安装器。

Miniconda is a minimal installer provided by Anaconda. Use this installer if you want to install most packages yourself.

Anaconda Distribution#

Anaconda Distribution 是一个功能完整的安装器,附带了一整套用于数据科学的软件包,以及 Anaconda Navigator(一个用于管理 conda 环境的图形界面应用)。

Anaconda Distribution is a full featured installer that comes with a suite of packages for data science, as well as Anaconda Navigator, a GUI application for working with conda environments.

Miniforge#

Miniforge 是由 conda-forge 社区维护的安装器,预配置为使用 conda-forge 通道。如需了解更多信息,请访问 conda-forge 官方网站

Miniforge is an installer maintained by the conda-forge community that comes preconfigured for use with the conda-forge channel. To learn more about conda-forge, visit their website.

备注

Miniconda 和 Anaconda Distribution 默认配置为使用 Anaconda 软件源,并且从该源安装/使用软件包受 Anaconda 服务条款 的约束,这意味着 可能 需要商业付费许可。根据 2024 年 9 月的政策,对于个人用户、高校、以及少于 200 名员工的公司,存在例外情况。

请查阅最新的 服务条款 、Anaconda 关于学术和科研使用条款的更新说明: Anaconda 的服务条款更新说明(适用于学术和研究用途) ,以及 Anaconda 服务条款常见问答 以获取详细解答。

备注

Miniconda and Anaconda Distribution come preconfigured to use the Anaconda Repository and installing/using packages from that repository is governed by the Anaconda Terms of Service, which means that it might require a commercial fee license. There are exceptions for individuals, universities, and companies with fewer than 200 employees (as of September 2024).

Please review the terms of service, Anaconda's most recent Update on Anaconda’s Terms of Service for Academia and Research, and the Anaconda Terms of Service FAQ to answer your questions.

系统要求#

System requirements

  • 支持的操作系统:Windows、macOS 或 Linux

  • 对于 Miniconda 或 Miniforge:需要 400 MB 的磁盘空间

  • 对于 Anaconda:下载和安装所需至少 3 GB 的磁盘空间

  • Windows 系统:Python 3.9 需要 Windows 8.1 或更新版本

小贴士

如果你选择安装在用户可写的位置(例如 /Users/my-username/condaC:\Users\my-username\conda),则无需管理员权限或 root 权限即可安装 conda。

  • A supported operating systems: Windows, macOS, or Linux

  • For Miniconda or Miniforge: 400 MB disk space

  • For Anaconda: Minimum 3 GB disk space to download and install

  • For Windows: Windows 8.1 or newer for Python 3.9

Tip

You do not need administrative or root permissions to install conda if you select a user-writable install location (e.g. /Users/my-username/conda or C:\Users\my-username\conda).

常规安装#

Regular installation

按照您的操作系统的说明进行操作:

Follow the instructions for your operating system:

静默安装#

Installing in silent mode

你可以使用 静默安装 方式部署或测试 Miniconda、Anaconda 或 Miniforge,或用于构建服务(如 GitHub Actions)。

请根据操作系统查阅对应的静默模式安装指南:

You can use silent installation of Miniconda, Anaconda, or Miniforge for deployment or testing or building services, such as GitHub Actions.

Follow the silent-mode instructions for your operating system:

加密哈希验证#

Cryptographic hash verification

MinicondaAnaconda Distribution 提供 SHA-256 校验和。我们不推荐使用 MD5 校验方式,因为 SHA-256 更安全。

下载安装文件后,在安装前请使用如下方法进行校验:

  • Windows:

    • 如果你安装了 PowerShell V4 或更高版本:

      打开 PowerShell 控制台并运行以下命令进行校验:

      Get-FileHash filename -Algorithm SHA256
      
    • 如果未安装 PowerShell V4 或更高版本:

      可使用 Microsoft 网站提供的免费 在线校验工具

      1. 下载该工具并解压。

      2. 打开命令提示符窗口。

      3. 切换到包含目标文件的目录。

      4. 运行以下命令:

        Start-PsFCIV -Path C:\path\to\file.ext -HashAlgorithm SHA256 -Online
        
  • macOS:在 iTerm 或终端中输入 shasum -a 256 filename

  • Linux:在终端中输入 sha256sum filename

SHA-256 checksums are available for Miniconda and Anaconda Distribution. We do not recommend using MD5 verification as SHA-256 is more secure.

Download the installer file and, before installing, verify it as follows:

  • Windows:

    • If you have PowerShell V4 or later:

      Open a PowerShell console and verify the file as follows:

      Get-FileHash filename -Algorithm SHA256
      
    • If you don't have PowerShell V4 or later:

      Use the free online verifier tool on the Microsoft website.

      1. Download the file and extract it.

      2. Open a Command Prompt window.

      3. Navigate to the file.

      4. Run the following command:

        Start-PsFCIV -Path C:\path\to\file.ext -HashAlgorithm SHA256 -Online
        
  • macOS: In iTerm or a terminal window enter shasum -a 256 filename.

  • Linux: In a terminal window enter sha256sum filename.