Grant Petty
Grant Petty

Reputation: 1271

What is the correct way to upgrade from broken miniconda to a clean and complete anaconda distribution?

I have previously being using miniconda and installing needed packages on an ad hoc basis, usually in specific environments tailored to the task at hand. I'm now constantly running into error messages about inconsistencies and failed install commands even when I try to create a new environment from scratch. So I'd like to try to make a fresh start and install the entire clean anaconda distribution, ideally without clobbering the existing environments I have that do still work.

I tried simply using conda install -c anaconda anaconda at the root level (no virtual environment) but even that returned:

Collecting package metadata (current_repodata.json): done Solving environment: \ The environment is inconsistent, please check the package plan carefully The following packages are causing the inconsistency:

defaults/linux-64::asn1crypto==0.24.0=py37_0 failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: | failed with initial frozen solve. Retrying with flexible solve.

At that point I aborted and decided to seek expert advice.

Upvotes: 3

Views: 881

Answers (1)

Matt Thompson
Matt Thompson

Reputation: 659

Scorched-earth: remove the entire Miniconda install by removing the folder everything is in, which is probably $CONDA_PREFIX. Replace with a fresh install (Miniconda, Anaconda, or your favorite replacement) and then re-build your environments. In my opinion, since environments are disposable, a fresh install is preferred over trying to get several broken-looking environments to work. This will obviously take some time, but can be done on a scale of minutes rather than the hours it can take trying to fix broken environments.

Careful, but time-consuming: uninstall a bunch of programs and then re-install one by one. For example, conda install numpy will likely remove a ton of packages if you're working with scientific software. This has the benefit of keeping other installation configurations, but I don't really think it's worth the time and headache (again, with environments being disposable and designed to quickly be recreated).

Upvotes: 2

Related Questions