Stuck at Solving Environment on Anaconda
Solution 1
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.
Solution 2
use this:
conda config --set channel_priority strict
pay attention that it is channel_priority and not priority_channel
Solution 3
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
Solution 4
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.
Solution 5
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.

Johnson Sam
Updated on January 14, 2022Comments
-
Johnson Sam over 1 year
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?
-
Johnson Sam over 2 yearsTried both and they didn't work. Do I need to change the file path to a specific path to make these downloads? Currently just at /Users/myname
-
Johnson Sam over 2 yearsI just tried that, and it works but the solution for that is basically just creating a new environment, which I feel is more of a workaround that an actual fix. I don't understand why I am facing this issue as my old macbook worked fine without needing to create a new environment
-
Jatin Mehrotra over 2 yearstry this
conda config --set channel_priority strict
,did it work? or even this add these paths to my environment variables: C:\Anaconda3 C:\Anaconda3\Library\mingw-w64\bin C:\Anaconda3\Library\usr\bin C:\Anaconda3\Library\bin C:\Anaconda3\Scripts change path according to your directory paths -
Johnson Sam over 2 yearsI changed the channel priority to strict and to flexible but both still didn't work. I don't understand how to add paths to the environment variables. Also I'm using MacOS
-
Johnson Sam over 2 yearsIt seems like the issue has to do with conda because I can install packages fine using pip
-
AMC over 2 years
conda config --remove channels conda-forge
Is OP using conda-forge in the first place? -
Rubi Shnol almost 2 years
'conda-forge' is not in the 'channels' key of the config file
-
avivr over 1 yearIn case it helps someone: This solved my "Solving Environment take forever" problem, but I also had to re-order the list of channels in my
environment.yml
file. I putconda-forge
first, then package-specific channels likepytorch
, then putdefaults
last. From the docs it seems that this causes conda to skip searching in the low-priory channels once a package is found in a high-priority channel, thus shrinking the search-space, but then the channel order matters very much. -
Jared Still over 1 yearThank you! That fixed the issue for me, on a brand new Python install.
-
rsmith54 about 1 yearI hit this issue trying to install mamba unfortunately :/
-
Nihir about 1 yearHad to wait over an hour to get Mamba installed (thanks Conda 🙄) - but its speed is life changing!