news 2026/8/1 19:02:57

Anaconda vs Miniconda:Python 环境管理

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
Anaconda vs Miniconda:Python 环境管理

Anaconda vs Miniconda:Python 环境管理

  • 1. 选择 Anaconda or Miniconda
    • 1.1. Anaconda or Miniconda?
    • 1.2. GUI versus command line installer
    • 1.3. Cryptographic hash verification
  • 2. Managing Python
    • 2.1. Viewing a list of available Python versions
    • 2.2. Installing a different version of Python
    • 2.3. Updating Python
  • 3. Managing packages
    • 3.1. Searching for packages
    • 3.2. Installing packages
    • 3.3. Installing non-conda packages
    • 3.4. Viewing a list of installed packages
    • 3.5. Updating packages
    • 3.6. Removing packages
  • References

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

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

Downloading conda
https://docs.conda.io/projects/conda/en/latest/user-guide/install/download.html

Miniconda 软件库
https://repo.anaconda.com/miniconda/

Commands
https://docs.conda.io/projects/conda/en/latest/commands/index.html

1. 选择 Anaconda or Miniconda

You have 3 conda download options:

  • Download Anaconda - free.
  • Download Miniconda - free.
  • Purchase Anaconda Enterprise.

You can download any of these 3 options with legacy Python 2.7 or current Python 3.

If you are unsure which option to download, choose the most recent version of Anaconda3. If you are on Windows or macOS, choose the version with the GUI installer.

purchase ['pɜ:tʃəs]:v. 购买,获得,赢得,升起,举起 n. 购买,购买的东西,支点,财产置得,(地产的) 年收益,紧握,起重装置 enterprise [ˈentəpraɪz]:n. 企业,事业,进取心,事业心 legacy [ˈleɡəsi]:n. 遗赠,遗产 Anaconda [ˌænəˈkɒndə]

1.1. Anaconda or Miniconda?

Choose Anaconda if you:

  • Are new to conda or Python.
  • Like the convenience of having Python and over 1,500 scientific packages automatically installed at once.
  • Have the time and disk space - a few minutes and 3 GB.
  • Do not want to individually install each of the packages you want to use.
  • Wish to use a set of packages curated and vetted for interoperability and usability.
individually [ˌɪndɪˈvɪdʒuəli]:adv. 个别地,单独地

Choose Miniconda if you:

  • Do not mind installing each of the packages you want to use individually.
  • Do not have time or disk space to install over 1,500 packages at once.
  • Want fast access to Python and the conda commands and you wish to sort out the other programs later.

Anaconda 是包含常用包的版本,Miniconda 是精简版,推荐使用 Miniconda。

1.2. GUI versus command line installer

Both GUI and command line installers are available for Windows, macOS, and Linux:

  • If you do not wish to enter commands in a terminal window, choose the GUI installer.
  • If GUIs slow you down, choose the command line version.

1.3. Cryptographic hash verification

SHA-256 checksums are available for Miniconda and Anaconda.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:pathtofile.ext -HashAlgorithm SHA256 -Online

macOS:In iTerm or a terminal window entershasum -a 256 filename.
Linux:In a terminal window entersha256sum filename.

(base) yongqiang@yongqiang:~/software$ sha256sum platform-tools_r37.0.0-win.zip 4fe305812db074cea32903a489d061eb4454cbc90a49e8fea677f4b7af764918 platform-tools_r37.0.0-win.zip (base) yongqiang@yongqiang:~/software$
cryptographic [,krɪptə'græfɪk]:adj. 关于暗号的,用密码写的

2. Managing Python

https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-python.html

Conda treats Python the same as any other package, so it is easy to manage and update multiple installations.

Conda supports Python 3.10, 3.11, 3.12, 3.13, and 3.14.

2.1. Viewing a list of available Python versions

To list the versions of Python that are available to install, in your terminal window, run:

(base) yongqiang@yongqiang:~$ conda search python Loading channels: done # Name Version Build Channel python 2.7.13 hac47a24_15 anaconda/pkgs/main python 2.7.13 heccc3f1_16 anaconda/pkgs/main python 2.7.13 hfff3488_13 anaconda/pkgs/main ... python 3.14.4 h490e9c7_100_cp314 anaconda/pkgs/main python 3.14.4 h9109617_0_cp314t anaconda/pkgs/main python 3.14.5 h1927d3b_0_cp314t anaconda/pkgs/main python 3.14.5 h4bdf6f9_100_cp314 anaconda/pkgs/main python 3.14.6 h1927d3b_0_cp314t anaconda/pkgs/main python 3.14.6 h1927d3b_1_cp314t anaconda/pkgs/main python 3.14.6 h4bdf6f9_100_cp314 anaconda/pkgs/main python 3.14.6 h4bdf6f9_101_cp314 anaconda/pkgs/main (base) yongqiang@yongqiang:~$

This lists all packages whose names contain the textpython.

To list only the packages whose full name is exactlypython, add the--full-nameoption. In your terminal window, run:

(base) yongqiang@yongqiang:~$ conda search --full-name python Loading channels: done # Name Version Build Channel python 2.7.13 hac47a24_15 anaconda/pkgs/main python 2.7.13 heccc3f1_16 anaconda/pkgs/main python 2.7.13 hfff3488_13 anaconda/pkgs/main python 2.7.14 h1571d57_29 anaconda/pkgs/main ... python 3.14.4 h490e9c7_100_cp314 anaconda/pkgs/main python 3.14.4 h9109617_0_cp314t anaconda/pkgs/main python 3.14.5 h1927d3b_0_cp314t anaconda/pkgs/main python 3.14.5 h4bdf6f9_100_cp314 anaconda/pkgs/main python 3.14.6 h1927d3b_0_cp314t anaconda/pkgs/main python 3.14.6 h1927d3b_1_cp314t anaconda/pkgs/main python 3.14.6 h4bdf6f9_100_cp314 anaconda/pkgs/main python 3.14.6 h4bdf6f9_101_cp314 anaconda/pkgs/main (base) yongqiang@yongqiang:~$

2.2. Installing a different version of Python

To install a different version of Python without overwriting the current version, create a new environment and install the second Python version into it:

  1. Create the new environment:

To create the new environment for Python 3.9, in your terminal window run:

conda create -n py39 python=3.9

Replacepy39with the name of the environment you want to create.python=3.9is the package and version you want to install in this new environment. This could be any package, such asnumpy=1.19, or multiple packages.

  1. Activate the new environment.

  2. Verify that the new environment is your current environment.

  3. To verify that the current environment uses the new Python version, in your terminal window, run:

python --version

2.3. Updating Python

To update Python to the latest version in your environment, run:

conda update python

This command will update you to the latest major release (e.g. frompython=3.10topython=3.12).

If you would like to remain on a minor release, use theconda installcommand instead:

conda install python=3.10

3. Managing packages

https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html

3.1. Searching for packages

To see if a specific package, such as SciPy, is available for installation:

conda search scipy

To see if a specific package, such as SciPy, is available for installation from Anaconda.org:

conda search --override-channels --channel defaults scipy

To see if a specific package, such as iminuit, exists in a specific channel, such as http://conda.anaconda.org/mutirri, and is available for installation:

conda search --override-channels --channel http://conda.anaconda.org/mutirri iminuit

3.2. Installing packages

To install a specific package such as SciPy into an existing environment “myenv”:

conda install --name myenv scipy

If you do not specify the environment name, which in this example is done by--name myenv, the package installs into the current environment:

conda install scipy

To install a specific version of a package such as SciPy:

conda install scipy=0.15.0

To install multiple packages at once, such as SciPy and cURL:

conda install scipy curl

It is best to install all packages at once, so that all of the dependencies are installed at the same time.

To install multiple packages at once and specify the version of the package:

conda install scipy=0.15.0 curl=7.26.0

To install a package for a specific Python version:

conda install scipy=0.15.0 curl=7.26.0 -n py34_env

If you want to use a specific Python version, it is best to use an environment with that version.

3.3. Installing non-conda packages

If a package is not available from conda or Anaconda.org, you may be able to find and install the package via conda-forge or with another package manager likepip.

Pip packages do not have all the features of conda packages and we recommend first trying to install any package with conda. If the package is unavailable through conda, try finding and installing it with conda-forge.

If you still cannot install the package, you can try installing it withpip. The differences betweenpipand conda packages cause certain unavoidable limits in compatibility but conda works hard to be as compatible with pip as possible.
如果仍然无法安装该软件包,您可以尝试使用pip安装。pip和 conda 软件包之间的差异会导致一些不可避免的兼容性限制,但 conda 会尽力使其与 pip 保持尽可能高的兼容性。

Bothpipand conda are included in Anaconda and Miniconda, so you do not need to install them separately.

Conda environments replace virtualenv, so there is no need to activate a virtualenv before using pip.

It is possible to havepipinstalled outside a conda environment or inside a conda environment.
pip可以安装在 conda 环境之外,也可以安装在 conda 环境之内。

To gain the benefits of conda integration, be sure to install pip inside the currently active conda environment and then install packages with that instance ofpip. The commandconda listshows packages installed this way, with a label showing that they were installed withpip.
要利用 conda 集成的优势,请确保在当前激活的 conda 环境中安装pip,然后使用该pip实例安装软件包。conda list命令会显示以这种方式安装的软件包,并带有使用pip安装的标签。

You can installpipin the current conda environment with the commandconda install pip.

If there are instances ofpipinstalled both inside and outside the current conda environment, the instance ofpipinstalled inside the current conda environment is used.

To install a non-conda package:

  1. Activate the environment where you want to put the program:

In your terminal window, runconda activate myenv.

  1. To use pip to install a program such as See, in your terminal window, run:
pip install see
  1. To verify the package was installed, in your terminal window, run:
conda list

3.4. Viewing a list of installed packages

To list all of the packages in the active environment:

conda list

To list all of the packages in a deactivated environment:

conda list -n myenv

3.5. Updating packages

Useconda updatecommand to check to see if a new update is available. If conda tells you an update is available, you can then choose whether or not to install it.

To update a specific package:

conda update biopython

To update Python:

conda update python

To update conda itself:

conda update conda

Conda updates to the highest version in its series, so when updating Python, it updates to the highest available in the 3.x series.

To update the Anaconda metapackage:

conda update conda conda update anaconda

Regardless of what package you are updating, conda compares versions and then reports what is available to install. If no updates are available, conda reports “All requested packages are already installed.”

If a newer version of your package is available and you wish to update it, type y to update:

Proceed ([y]/n)? y

3.6. Removing packages

To remove a package such as SciPy in an environment such as myenv:

conda remove -n myenv scipy

To remove a package such as SciPy in the current environment:

conda remove scipy

To remove multiple packages at once, such as SciPy and cURL:

conda remove scipy curl

To confirm that a package has been removed:

conda list

References

[1] Yongqiang Cheng (程永强), https://yongqiang.blog.csdn.net/
[2] Anaconda vs Miniconda:Python 环境管理, https://mp.weixin.qq.com/s/a4JC_fMLoXPktl0eyUpiNQ

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/8/1 18:59:44

免费足球数据宝库:无需API密钥的football.json完全指南 ⚽

免费足球数据宝库:无需API密钥的football.json完全指南 ⚽ 【免费下载链接】football.json Free open public domain football data in JSON incl. English Premier League, Bundesliga, Primera Divisin, Serie A and more - No API key required ;-) 项目地址: …

作者头像 李华
网站建设 2026/8/1 18:59:29

终极免费解锁Windows多用户远程桌面:RDP Wrapper完整教程

终极免费解锁Windows多用户远程桌面:RDP Wrapper完整教程 【免费下载链接】rdpwrap RDP Wrapper Library 项目地址: https://gitcode.com/gh_mirrors/rdp/rdpwrap 你是否厌倦了Windows远程桌面的单用户限制?当家人需要远程学习、同事需要协作办公…

作者头像 李华
网站建设 2026/8/1 18:57:09

PyTorch自定义算子部署:打通ONNXRuntime C++推理环境全流程

1. 项目概述与核心价值最近在搞一个PyTorch模型部署的项目,遇到了一个挺典型的问题:模型里用了一个我们自己写的、PyTorch原生不支持的CUDA算子。训练阶段一切正常,但一到要导出ONNX模型,准备用ONnxRuntime(ORT&#x…

作者头像 李华
网站建设 2026/8/1 18:46:48

【YOLOv11模型改进系列】11 让数据增强策略“活”起来:在YOLOv11中实现自适应增强强度调度

11 让数据增强策略“活”起来:在YOLOv11中实现自适应增强强度调度 老伙计们,上周我们聊了渐进式遗忘机制,让模型在训练后期不再“死记硬背”。有读者反馈说:“原理懂了,但具体怎么在YOLOv11里把增强强度做成动态的?” 这让我想起上个月帮一个自动驾驶团队调模型的事——…

作者头像 李华
网站建设 2026/8/1 18:45:46

XUnity.AutoTranslator终极指南:5分钟让外语游戏变中文

XUnity.AutoTranslator终极指南:5分钟让外语游戏变中文 【免费下载链接】XUnity.AutoTranslator 项目地址: https://gitcode.com/gh_mirrors/xu/XUnity.AutoTranslator 还在为看不懂日语RPG剧情而烦恼吗?还在为英语游戏界面感到困惑吗&#xff1…

作者头像 李华