How do I update Anaconda?

前端 未结 12 1617
慢半拍i
慢半拍i 2020-11-29 14:15

I have Anaconda installed on my computer and I\'d like to update it. In Navigator I can see that there are several individual packages that can be updated, but also an

相关标签:
12条回答
  • 2020-11-29 14:59

    This can update the Python instance only:

    conda update python
    
    0 讨论(0)
  • 2020-11-29 15:01

    Open "command or conda prompt" and run:

    conda update conda
    conda update anaconda
    

    It's a good idea to run both command twice (one after the other) to be sure that all the basic files are updated.

    This should put you back on the latest 'releases', which contains packages that are selected by the people at Continuum to work well together.

    If you want the last version of each package run (this can lead to an unstable environment):

    conda update --all 
    

    Hope this helps.

    Sources:

    • https://docs.anaconda.com/anaconda/install/update-version
    • https://github.com/conda/conda/issues/1414#issuecomment-119071154
    0 讨论(0)
  • 2020-11-29 15:03

    If you have trouble to get e.g. from 3.3.x to 4.x (conda update conda "does not work" to get to the next version) than try it more specific like so:

    conda install conda=4.0 (or conda install anaconda=4.0)
    

    https://www.anaconda.com/blog/developer-blog/anaconda-4-release/

    You should know what you do, because conda could break due to the forced installation. If you would like to get more flexibility/security you could use pkg-manager like nix(-pkgs) [with nix-shell] / NixOS.

    0 讨论(0)
  • 2020-11-29 15:08

    If you are trying to update your Anaconda version to a new one, you'll notice that running the new installer wouldn't work, as it complains the installation directory is non-empty.

    So you should use conda to upgrade as detailed by the official docs:

    conda update conda
    conda update anaconda
    


    In Windows, if you made a "for all users" installation, it might be necessary to run from an Anaconda prompt with Administrator privileges.

    This prevents the error:

    ERROR conda.core.link:_execute(502): An error occurred while uninstalling package 'defaults::conda-4.5.4-py36_0'. PermissionError(13, 'Access is denied')

    0 讨论(0)
  • 2020-11-29 15:09

    This is what the official Anaconda documentation recommends:

    conda update conda
    conda update anaconda=2020.07
    

    If the second line throws an error (typo in the documentation?) this worked here:

    conda install anaconda=2020.07
    

    (You can find all version specifier here.)

    The command will update to a specific release of the Anaconda meta-package.

    This is, IMHO, what 95% of Anaconda users want. Simply upgrading to the latest version of the Anaconda meta-package (put together and tested by the Anaconda Distributors) and not caring about the update status of individual packages (which would be issued by conda update --all).

    0 讨论(0)
  • 2020-11-29 15:09

    To update your installed version to the latest version, say 2019.07, run:

    conda install anaconda=2019.07
    

    In most cases, this method can meet your needs and avoid dependency problems.

    0 讨论(0)
提交回复
热议问题