Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does conda try to update packages with --no-update-dependencies?

Often when I try to install a new package, conda wants to update other packages as well, even though I have added the --no-update-dependencies switch. The updates seem to be "unnecessary" - like most of the time only the last part of the version number has changed.

Today I wanted to install the mpld3 package and conda wants to update my python package from version 3.4.4-2 to 3.4.4-4, even though I have added the --no-update-dependencies switch.

How can I make conda install the mpld3 package without touching my other packages?

C:\...>conda install -p pyenv --no-update-dependencies mpld3
Fetching package metadata: ....
Solving package specifications: ...........

Package plan for installation in environment C:\...\pyenv:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    vs2010_runtime-10.00.40219.1|                0         1.1 MB
    python-3.4.4               |                4        31.7 MB
    mpld3-0.2                  |           py34_0         123 KB
    ------------------------------------------------------------
                                           Total:        33.0 MB

The following NEW packages will be INSTALLED:

    mpld3:          0.2-py34_0
    vs2010_runtime: 10.00.40219.1-0

The following packages will be UPDATED:

    python:         3.4.4-2 --> 3.4.4-4

Proceed ([y]/n)?
like image 892
stmax Avatar asked Mar 24 '16 08:03

stmax


People also ask

Does conda install dependencies?

Conda analyzes each package for compatible dependencies, and how to install them without conflict. If there is a conflict, Conda will let you know that the installation cannot be completed. By comparison, Pip installs all package dependencies regardless of whether they conflict with other packages already installed.

What does conda update conda do?

Updates conda packages to the latest compatible version. This command accepts a list of package names and updates them to the latest versions that are compatible with all other packages in the environment. Conda attempts to install the newest versions of the requested packages.


2 Answers

Just want to mention that these options are deprecated in new conda versions. For example, in conda version 4.6.7, you should use "conda install --no-deps yourpackage"

like image 95
JeffZheng Avatar answered Oct 23 '22 06:10

JeffZheng


tldr;

Don't worry about it, your packages are not being updated, only their build numbers, which should be harmless.

some explanation

What is being updated is the build number, not the version of each package installed.

As you can see, it is installing the vs2010_runtime, this is due to conda updating how its packages were built using features. Since you have Python 3.4 (which is built using Visual Studio 2010) it is installing the VS 2010 runtime. It would install the VS 2015 runtime if you were installing Python 3.5.

Build numbers/strings shouldn't break anyone because they're supposed to be fixes to the build process of that package (eg: you added a flag to the compilation which you didn't intend to).

It is arguable if conda should update the packages (same version, different build numbers) when --no-update-dependencies is present because you might end up with a bad installation.

like image 25
Edison Gustavo Muenz Avatar answered Oct 23 '22 06:10

Edison Gustavo Muenz