Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I revert to a previous package in Anaconda?

People also ask

How do you get back to base environment in Anaconda?

If you want to switch to another environment you could simply type: conda activate myenv within the base environment. Now when you deactivate myenv it will go back to base environment. When you are within an environment, the packages within that environment can be accessible.

Where are Anaconda packages saved?

List the dependencies that a specific package requires to run: conda search package_name --info. Find your installation's package cache directory: conda info. Find package dependencies. By default, Anaconda/Miniconda stores packages in ~/anaconda/pkgs/ (or ~/opt/pkgs/ on macOS Catalina).


I had to use the install function instead:

conda install pandas=0.13.1

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

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.