Updating Anaconda

Avoid

The Anaconda base Python environment is a Python distribution and should be updated collectively using the standalone images put together by Anaconda.

The following command should generally be avoided in the base Python environment:

conda update --all

The reason for this is it will attempt to individually update packages and may lead to an unstable base Python environment. Essentially when one package is updated that is a dependency for other packages, the other packages may be removed and therefore the Python environment becomes unstable.

Separate Python environments should be used if you need to use a newer version of a package outside of Anacondas standard image or a package only available on conda-forge.

Editting the .condarc

Open the Anaconda PowerShell Prompt from the Start Menu:

img_001

By default it will open in %USERPROFILE%:

img_002
img_003

If a .condrc file is present, it should be deleted using:

del .condarc
img_004
img_005

A new .condarc file using the libmamba solver and default channels can be created using:

conda config --set solver libmamba
img_006
img_007

The .condarc file looks like the following:

img_008

Deactivating the base Environment

To update Anaconda, you will first want to deactivate the base Python environment. To do this use:

conda deactivate
img_009

Notice there is now no longer any (base) prefix.

Searching for Anaconda Updates

To search for versions of Anaconda use:

conda search anaconda
img_010

You will get something like:

NameVersionBuildChannel
anaconda2023.07py310_0pkg/main
anaconda2023.07py310_1pkg/main
anaconda2023.07py311_0pkg/main
anaconda2023.07py311_1pkg/main
img_011

The py311_0 is Python 3.11.3 and comes with Anaconda 2023.07-1

The py311_1 is Python 3.11.4 and comes with Anaconda 2023.07-2

Anaconda 2023.07-0 was also Python 3.11.3 but was quickly replaced by 2023-07-1 and is not separately listed.

Installing a Specific Version of Anaconda

To install the latest version input:

conda install anaconda=2023.07=py311_1

Notice that = is used for the version number and again for the Python version and will install this specific version of Anaconda replacing the previous base Python environment.

img_012

Newer releases may be out by the time you read this tutorial. If present you will see these in your search query and will be able to amend the above command approriately.

Details about the packages to be updated will be listed:

img_013

Note when updating some packages may be downgraded, this happens when Anaconda deem a version of a package unsuitable and revert to an older version. Confer with Anaconda Release Notes for more details.

Input

y

in order to proceed with the changes:

img_014

Anaconda will now be updated:

img_015

Return to Anaconda Tutorial