How to update anaconda distributions and python packages?

10,488

This will update all packages:

conda update --all
Share:
10,488
Ger
Author by

Ger

I am associate professor in numerical simulations and physical-chemistry at Pau (France) in Université de Pau et des Pays de l'Adour. I did my phd in Paris XI (Orsay) on the study, by numeric simulations, of the photophysics properties of Fluorescent Proteins.

Updated on June 04, 2022

Comments

  • Ger
    Ger almost 2 years

    I have a anaconda distribution installed on a OS X system.

    If I look at the packages installed with anaconda navigator, I see that lots of package are upgradable. If I upgrade one of them, then I have a anaconda package in the list with the version custum. If I upgrade this package I came back to the previous version of the packages I have upgraded previously.

    Hereafter, I followed this page of the documentation.

    --> conda update conda
    Fetching package metadata .......
    Solving package specifications: ..........
    
    Package plan for installation in environment /blabla/anaconda:
    
    The following packages will be UPDATED:
    
        anaconda: 4.2.0-np111py35_0 --> custom-py35_0
        conda:    4.2.13-py35_0     --> 4.2.14-py35_0
        requests: 2.11.1-py35_0     --> 2.12.4-py35_0
    
    Proceed ([y]/n)? y
    ...
    [      COMPLETE      ]
    
    --> conda update anaconda
    Fetching package metadata .......
    Solving package specifications: ..........
    
    Package plan for installation in environment /blabla/anaconda:
    
    The following packages will be UPDATED:
    
        anaconda: custom-py35_0 --> 4.2.0-np111py35_0
    
    The following packages will be DOWNGRADED due to dependency conflicts:
    
        conda:    4.2.14-py35_0 --> 4.2.13-py35_0
        requests: 2.12.4-py35_0 --> 2.11.1-py35_0
    
    Proceed ([y]/n)? y
    ...
    [      COMPLETE      ]
    

    As you can see, with update conda, conda and request are updated to a newer version and with update anaconda, the same packages are downgrade to an older version.

    Thus my question is, given a current installation of anaconda, what should I do if I want to maintain packages and update the whole distribution ?

  • IanSR
    IanSR almost 7 years
    The answer by Mike is correct in 95% of cases, but since this is a common question and the apparently obvious answer (conda update anaconda, which normally you should not execute) leads to unexpected and undesireable results (such as actually downgrading packages), I have provided a longer discussion of this question here: stackoverflow.com/questions/45197777/how-do-i-update-anacond‌​a
  • Pigeon
    Pigeon over 6 years
    conda update conda didn't work in for me. This did. :)