How do I revert to a previous package in Anaconda?

PythonAnacondaConda

Python Problem Overview


If I do

conda info pandas

I can see all of the packages available.

I updated my pandas to the latest this morning, but I need to revert to a prior version now. I tried

conda update pandas 0.13.1

but that didn't work. How do I specify which version to use?

Python Solutions


Solution 1 - Python

I had to use the install function instead:

conda install pandas=0.13.1

Solution 2 - Python

For the case that you wish to revert a recently installed package that made several changes to dependencies (such as tensorflow), you can "roll back" to an earlier installation state via the following method:

conda list --revisions
conda install --revision [revision number]

The first command shows previous installation revisions (with dependencies) and the second reverts to whichever revision number you specify.

Note that if you wish to (re)install a later revision, you may have to sequentially reinstall all intermediate versions. If you had been at revision 23, reinstalled revision 20 and wish to return, you may have to run each:

conda install --revision 21
conda install --revision 22
conda install --revision 23

Solution 3 - Python

I know it was not available at the time, but now you could also use Anaconda navigator to install a specific version of packages in the environments tab.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionchrisaycockView Question on Stackoverflow
Solution 1 - PythonchrisaycockView Answer on Stackoverflow
Solution 2 - Pythonanon01View Answer on Stackoverflow
Solution 3 - PythonSzèles ÀronView Answer on Stackoverflow