问题:Conda和Anaconda有什么区别?

问题后更新:

有关更多详细信息,请参见《 Conda简介》


问题:

当我尝试更新anaconda时,我首先在ubuntu上安装了Anaconda~/anaconda,根据Continuum Analytics 的文档,我应该使用以下命令:

conda update conda
conda update anaconda

然后我意识到我没有安装conda,因此我使用此处的文档进行了安装。

安装conda后,当我运行时conda update anaconda,出现以下错误:

错误:/ home / xiang / miniconda中未安装软件包“ anaconda”

似乎conda假定我的anaconda已安装,/home/xiang/miniconda但事实并非如此。

问题:

  1. condaanaconda有什么区别?
  2. 如何告诉conda我的Anaconda安装在哪里?

Post-question update:

See Introduction to Conda for more details.


The problem:

I first installed Anaconda on my ubuntu at ~/anaconda, when I was trying to update my anaconda, according to the documentation from Continuum Analytics, I should use the following commands:

conda update conda
conda update anaconda

Then I realized that I did not have conda installed, so I installed it using the documentation from here.

After conda is installed, when I run conda update anaconda, I got the following error:

Error: package ‘anaconda’ is not installed in /home/xiang/miniconda

It appears conda is assuming my anaconda is installed under /home/xiang/miniconda which is NOT true.

The questions:

  1. What are the differences between conda and anaconda?
  2. How can I tell conda where my anaconda is installed?

回答 0

conda是程序包管理器。Anaconda是一组大约一百个程序包,包括conda,numpy,scipy,ipython notebook等。

您安装了Miniconda,这是Anaconda的一个较小替代方案,它只是conda及其依赖项,而不是上面列出的依赖项。

拥有Miniconda之后,您可以使用轻松地将Anaconda安装到其中conda install anaconda

conda is the package manager. Anaconda is a set of about a hundred packages including conda, numpy, scipy, ipython notebook, and so on.

You installed Miniconda, which is a smaller alternative to Anaconda that is just conda and its dependencies, not those listed above.

Once you have Miniconda, you can easily install Anaconda into it with conda install anaconda.


回答 1

简要

conda 既是命令行工具,又是python包。

Miniconda安装程序= Python + conda

Anaconda安装程序= Python conda++ meta包anaconda

meta Python pkg anaconda=约160个其他Python日常使用的软件包

Anaconda安装程序= Miniconda安装程序+ conda install anaconda

详情

conda是环境经理和程序包经理。这意味着工具本身。conda使有可能

  • 安装软件包 conda install flake8
  • 使用任何版本的Python创建环境 conda create -n myenv python=3.6

conda不是二进制命令,而是Python包。要进行conda工作,您必须创建一个Python环境并将软件包安装conda到其中。这是Anaconda安装程序和Miniconda安装程序进入的地方。

安装程序Minoconda将安装Python和软件包conda。安装程序Anaconda不仅会执行Miniconda的操作,还会安装一个为您命名的meta Python软件包anaconda

元软件包是不包含实际软件的软件包,仅依赖于要安装的其他软件包。

pkg anaconda中包含的实际160多个python软件包info/recipe/meta.yaml在其源文件中列出。

package:
    name: anaconda
    version: '2019.07'
build:
    ignore_run_exports:
        - '*'
    number: '0'
    pin_depends: strict
    string: py36_0
requirements:
    build:
        - python 3.6.8 haf84260_0
    is_meta_pkg:
        - true
    run:
        - alabaster 0.7.12 py36_0
        - anaconda-client 1.7.2 py36_0
        - anaconda-project 0.8.3 py_0
        # ...
        - beautifulsoup4 4.7.1 py36_1
        # ...
        - curl 7.65.2 ha441bb4_0
        # ...
        - hdf5 1.10.4 hfa1e0ec_0
        # ...
        - ipykernel 5.1.1 py36h39e3cac_0
        - ipython 7.6.1 py36h39e3cac_0
        - ipython_genutils 0.2.0 py36h241746c_0
        - ipywidgets 7.5.0 py_0
        # ...
        - jupyter 1.0.0 py36_7
        - jupyter_client 5.3.1 py_0
        - jupyter_console 6.0.0 py36_0
        - jupyter_core 4.5.0 py_0
        - jupyterlab 1.0.2 py36hf63ae98_0
        - jupyterlab_server 1.0.0 py_0
        # ...
        - matplotlib 3.1.0 py36h54f8f79_0
        # ...
        - mkl 2019.4 233
        - mkl-service 2.0.2 py36h1de35cc_0
        - mkl_fft 1.0.12 py36h5e564d8_0
        - mkl_random 1.0.2 py36h27c97d8_0
        # ...
        - nltk 3.4.4 py36_0
        # ...
        - numpy 1.16.4 py36hacdab7b_0
        - numpy-base 1.16.4 py36h6575580_0
        - numpydoc 0.9.1 py_0
        # ...
        - pandas 0.24.2 py36h0a44026_0
        - pandoc 2.2.3.2 0
        # ...
        - pillow 6.1.0 py36hb68e598_0
        # ...
        - pyqt 5.9.2 py36h655552a_2
        # ...
        - qt 5.9.7 h468cd18_1
        - qtawesome 0.5.7 py36_1
        - qtconsole 4.5.1 py_0
        - qtpy 1.8.0 py_0
        # ...
        - requests 2.22.0 py36_0
        # ...
        - sphinx 2.1.2 py_0
        - sphinxcontrib 1.0 py36_1
        - sphinxcontrib-applehelp 1.0.1 py_0
        - sphinxcontrib-devhelp 1.0.1 py_0
        - sphinxcontrib-htmlhelp 1.0.2 py_0
        - sphinxcontrib-jsmath 1.0.1 py_0
        - sphinxcontrib-qthelp 1.0.2 py_0
        - sphinxcontrib-serializinghtml 1.1.3 py_0
        - sphinxcontrib-websupport 1.1.2 py_0
        - spyder 3.3.6 py36_0
        - spyder-kernels 0.5.1 py36_0
        # ...

来自meta pkg的预安装软件包anaconda主要用于Web抓取和数据科学。像requestsbeautifulsoupnumpynltk,等。

Brief

conda is both a command line tool, and a python package.

Miniconda installer = Python + conda

Anaconda installer = Python + conda + meta package anaconda

meta Python pkg anaconda = about 160 other Python packages for daily use in data science

Anaconda installer = Miniconda installer + conda install anaconda

Detail

conda is an environment manager and a package manager. It means the tool itself. conda makes it possible to

  • install package with conda install flake8
  • create an environment with any version of Python with conda create -n myenv python=3.6

conda is not a binary command, is a Python package. To make conda work, you have to create a Python environment and install package conda into it. This is where Anaconda installer and Miniconda installer comes in.

Installer Minoconda installs a Python and the package conda. Installer Anaconda not only does what Miniconda does, it also install a meta Python package named anaconda for you.

Meta packages, are packages that do NOT contain actual softwares and simply depend on other packages to be installed.

The actual 160+ python packages included in pkg anaconda are listed in info/recipe/meta.yaml in its source file.

package:
    name: anaconda
    version: '2019.07'
build:
    ignore_run_exports:
        - '*'
    number: '0'
    pin_depends: strict
    string: py36_0
requirements:
    build:
        - python 3.6.8 haf84260_0
    is_meta_pkg:
        - true
    run:
        - alabaster 0.7.12 py36_0
        - anaconda-client 1.7.2 py36_0
        - anaconda-project 0.8.3 py_0
        # ...
        - beautifulsoup4 4.7.1 py36_1
        # ...
        - curl 7.65.2 ha441bb4_0
        # ...
        - hdf5 1.10.4 hfa1e0ec_0
        # ...
        - ipykernel 5.1.1 py36h39e3cac_0
        - ipython 7.6.1 py36h39e3cac_0
        - ipython_genutils 0.2.0 py36h241746c_0
        - ipywidgets 7.5.0 py_0
        # ...
        - jupyter 1.0.0 py36_7
        - jupyter_client 5.3.1 py_0
        - jupyter_console 6.0.0 py36_0
        - jupyter_core 4.5.0 py_0
        - jupyterlab 1.0.2 py36hf63ae98_0
        - jupyterlab_server 1.0.0 py_0
        # ...
        - matplotlib 3.1.0 py36h54f8f79_0
        # ...
        - mkl 2019.4 233
        - mkl-service 2.0.2 py36h1de35cc_0
        - mkl_fft 1.0.12 py36h5e564d8_0
        - mkl_random 1.0.2 py36h27c97d8_0
        # ...
        - nltk 3.4.4 py36_0
        # ...
        - numpy 1.16.4 py36hacdab7b_0
        - numpy-base 1.16.4 py36h6575580_0
        - numpydoc 0.9.1 py_0
        # ...
        - pandas 0.24.2 py36h0a44026_0
        - pandoc 2.2.3.2 0
        # ...
        - pillow 6.1.0 py36hb68e598_0
        # ...
        - pyqt 5.9.2 py36h655552a_2
        # ...
        - qt 5.9.7 h468cd18_1
        - qtawesome 0.5.7 py36_1
        - qtconsole 4.5.1 py_0
        - qtpy 1.8.0 py_0
        # ...
        - requests 2.22.0 py36_0
        # ...
        - sphinx 2.1.2 py_0
        - sphinxcontrib 1.0 py36_1
        - sphinxcontrib-applehelp 1.0.1 py_0
        - sphinxcontrib-devhelp 1.0.1 py_0
        - sphinxcontrib-htmlhelp 1.0.2 py_0
        - sphinxcontrib-jsmath 1.0.1 py_0
        - sphinxcontrib-qthelp 1.0.2 py_0
        - sphinxcontrib-serializinghtml 1.1.3 py_0
        - sphinxcontrib-websupport 1.1.2 py_0
        - spyder 3.3.6 py36_0
        - spyder-kernels 0.5.1 py36_0
        # ...

The pre-installed packages from meta pkg anaconda are mainly for web scraping and data science. Like requests, beautifulsoup, numpy, nltk, etc.


声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。