I have tried multiple ways but can't conda install packages (in my case, geopandas). I tried geopandas install guide, but get output that the solver runs forever. I tried without creating an environment, after creating a new environment, using defaults channel and using conda-forge channel. None worked.
$ conda create -n top
$ conda activate top
$ conda config --env --add channels conda-forge
$ conda config --env --set channel_priority strict
$ conda install python=3 geopandas
Collecting package metadata (current_repodata.json): done
Solving environment: 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: \
I don't want to use pip install
because it is preferred to use conda install
.
Also I tried installing using Anaconda Navigator following this answer, but the progress bar keeps hanging, saying "solving package specifications".
To Solve Solving environment: failed with initial frozen solve. Retrying with flexible solve Error Just create an env and activate that env and then do the install and your error will be solved.
Mamba is definitely faster than Miniconda, but unfortunately it is still quite a wedge to download. Because it depends on Conda, either way of installing it means you end up with both package managers on your system.
Unlike many package managers, Anaconda's repositories generally don't filter or remove old packages from the index. This allows old environments to be easily recreated. However, it does mean that the index metadata is always growing, and thus conda becomes slower as the number of packages increases.
Iteratively installing packages is a real choking point for Conda. If you know up front that the env will require certain packages, then specify them at creation:
conda create -n top -c conda-forge -c defaults python=3 geopandas
This solves in seconds for me. If you have many packages, then use a YAML.
Sometimes ad hoc installations are unavoidable. For tough solves (or just generally), try using mamba
, a compiled (fast!) drop-in replacement for conda
. Mamba will shine where Conda struggles.
# install mamba
conda install -n base conda-forge::mamba
# use mamba
mamba install -n top geopandas
After trying many advice from Conda's GitHub page, I found out that the issue was not being able to find dependencies for the python version I had installed. Creating new environment help but with one more argument for python version.
conda create -n branch-env python=3.7
conda activate branch-env
conda install geopandas
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With