Stuck at Solving Environment on Anaconda

Viewed 108697

I am running OSX Catalina. After downloading Anaconda, I'm having trouble downloading external packages. I tried in both the GUI and the terminal, but the process keeps getting stuck at "Solving environment".

I understand creating a new environment can be a workaround, but I would rather fix the issue at hand.

Any ideas?

15 Answers

The following steps may work to resolve the issue.

conda config --remove channels conda-forge
conda config --add channels conda-forge

if it doesn't work then try this

conda update conda

if nothing works try seeing this github solution, it worked for many.

use this:

conda config --set channel_priority strict

pay attention that it is channel_priority and not priority_channel

running

conda config --set channel_priority flexible

worked for me

Update, still ran into some issues so I found Mamba, and oh my god my life changed conda is the worst package manager ever

all my issues were solved when I used mamba

# install mamba
conda install -n base conda-forge::mamba

# use mamba
mamba install pandas

Please, check that python is actually listed in environment.yml or conda create -n your_environment --file requirements.txt python=3.7. Otherwise, conda is traversing all versions of python available. Check that Python is listed.

for updated conda version over 4.12.0 'Libmamba' with advantages like:

  • Improve conda’s resolving speeds by 50-80%*

  • Maximize backwards compatibility so as to not break any current
    functionality

  • Build the plugin infrastructure for others to create custom solvers

are mentioned in Anaconda's official blog post, A Faster Solver for Conda: Libmamba

so for making libmamba your default solver(make sure your conda version is 4.12): conda install -n base conda-libmamba-solver

and to try it temporarily:conda create -n demo --experimental-solver=libmamba --dry-run install <some package>

I had similar problems trying to install external packages such as graph-tools and I solved it by creating a new environment. I know you prefer other options but it's the only thing that worked for me.

conda config --remove channels conda-forge

conda config --set channel_priority flexible

This fixed the problem with the solving environment step. After that I was able to update packages (such as conda and anaconda) and sort out various dependency issues.

you may also want to check your ~/.conda directory permissions. I installed conda on my MacOS using Homebrew and for some reason this directory had only read/write permissions for root. After changing the permissions and following the instructions from above, everything works smooth and fast now

It might be taking long because of package version conflicts. My solution was to install some packages using pip instead of conda install. For example:

pip install tensorflow

Try this in a new environment so it doesn't mess up your existing ones.

Sounds very simple but make sure you're in your environment

conda activate <Your Environment>

I was having the same issue while creating my conda environment using environment.yml file.

conda env create -f environment.yml

My issue was fixed by updating conda and setting channel priority to strict:

conda update conda
conda config --set channel_priority strict

Try installing ANACONDA3 2019-3. I had similar issues but after installing the above version of anaconda they were all fixed.

This fixed the hang for me. Although the install went on to fail. conda config --set priority_channel strict

Related