William Okafor
2 min readNov 21, 2018

Fix Broken Anaconda Environment Due To Recent Package Download

So i installed tensorflow into my base anaconda environment and it practically broke everything.
Many important packages stopped working(Pandas, sklearn, matplotlib etc)
After much research and attempts to find quick fixes that didn’t really promise to solve the problem for all the affected packages, i found an overall solution and a best practice for installing packages

Run this command:conda list --revisions to view all the changes you’ve made in your environment.

Each revision would have a number attached to it (e.g rev 0)

Locate the revision number before your pulled in the package that broke things and run this command conda install --revision [revision number]

Note that if you wish to (re)install a later revision, you may have to sequentially reinstall all intermediate versions. This means that 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
That works for me though

First, It’s best to separate concerns with environments when writing applications, so if your program has a dependency that’s not likely needed in other applications, create an environment for it.

Secondly, when installing a new package, if you get notified that it’s gonna make changes (upgrade or downgrade) to some packages you already have in that environment, please first create a new environment for this program before pulling in this package. At the end of the day, you might choose to leave the new package in this new environment, and any new program that has this dependency, can use that environment as well.