Gabriel Fair
Gabriel Fair

Reputation: 4264

Why did anaconda install return different results when using conda-forge?

Background

When I run the following two commands at the same time on the same computer with the same anaconda install, I get different results:

  1. conda install pymysql
  2. conda install -c conda-forge pymysql

As seen in the screenshot below (screenshot contents have also been pasted below): enter image description here

Mainly they have different sizes. And the fact that different packages exist with the same version number concerns me.

Consider:

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
conda-4.8.0                |           py37_1         2.8 MB
pymysql-0.9.3              |           py37_0          83 KB
------------------------------------------------------------
                                       Total:         2.9 MB

verses what was received in the forge channel:

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
conda-4.8.0                |           py37_1         3.0 MB  conda-forge
pymysql-0.9.3              |             py_0          41 KB  conda-forge
------------------------------------------------------------
                                       Total:         3.1 MB

Question

What is going on here to cause this?

How can one verify these conda packages quickly?

Upvotes: 1

Views: 371

Answers (2)

merv
merv

Reputation: 76740

As @eatmeimadanish points out, these are coming from different channels which maintain separate build recipes. Note that build recipes are independent of a package version, and there can often be multiple builds of the same version of a package depending on compilation options. Examples of this could be using different BLAS or CUDA libraries. There could also be optional components that one build might enable that another doesn't.

Both the recipes for Anaconda and Conda Forge are open. For example, you can compare what goes into the two builds of Conda:

conda-forge/conda-feedstock versus AnacondaRecipes/conda-feedstock

or the PyMySQL builds:

conda-forge/pymysql-feedstock versus AnacondaRecipes/pymysql-feedstock

Conda Forge is open source, so many of the packages are maintained by community contributors. While arbitrary users can suggest feedstocks and make pull requests, there is still a chain of custody such that only a limited set of maintainers per package can merge and approve PRs.

By default, Conda use hash checks to verify packages on Anaconda Cloud, but this only checks that the package you download is hash-equivalent to what the uploader deposited. For defaults channel, we can presume the uploader is a Continuum, Inc. employee; for conda-forge it's the automated build toolchain triggered by a feedstock maintainer.

Upvotes: 2

eatmeimadanish
eatmeimadanish

Reputation: 3907

The default channel are packages supplied by anaconda. The conda-forge channel are packages kept up by the community and include binaries and installs for multiple OS's.

Depending on the source, you may be getting a precompiled binary install or a tar file compressed setup. I would advise using conda-forge for everything.

https://conda-forge.org/docs/user/introduction.html

You can view the differences yourself here:

https://anaconda.org/search?q=pymysql

Upvotes: 2

Related Questions